Showing
1 changed file
with
5 additions
and
5 deletions
... | @@ -35,19 +35,19 @@ export class RunnerService { | ... | @@ -35,19 +35,19 @@ export class RunnerService { |
35 | return { output: this.c(body, location) }; | 35 | return { output: this.c(body, location) }; |
36 | } | 36 | } |
37 | case 'cpp': { | 37 | case 'cpp': { |
38 | - this.cpp(body, location); | 38 | + return { output: this.cpp(body, location) }; |
39 | } | 39 | } |
40 | case 'js': { | 40 | case 'js': { |
41 | return { output: this.js(body, location) }; | 41 | return { output: this.js(body, location) }; |
42 | } | 42 | } |
43 | case 'go': { | 43 | case 'go': { |
44 | - this.go(body, location); | 44 | + return { output: this.go(body, location) }; |
45 | } | 45 | } |
46 | case 'ts': { | 46 | case 'ts': { |
47 | - this.ts(body, location); | 47 | + return { output: this.ts(body, location) }; |
48 | } | 48 | } |
49 | case 'py': { | 49 | case 'py': { |
50 | - this.py(body, location); | 50 | + return { output: this.py(body, location) }; |
51 | } | 51 | } |
52 | } | 52 | } |
53 | } | 53 | } |
... | @@ -87,7 +87,7 @@ export class RunnerService { | ... | @@ -87,7 +87,7 @@ export class RunnerService { |
87 | 87 | ||
88 | cpp(body: any, location: string) { | 88 | cpp(body: any, location: string) { |
89 | const output: Array<string> = []; | 89 | const output: Array<string> = []; |
90 | - if (body.input == []) { | 90 | + if (body.input == '' || body.input == undefined) { |
91 | const test = child_process.spawnSync('g++', [location, '-o', 'tmp'], { | 91 | const test = child_process.spawnSync('g++', [location, '-o', 'tmp'], { |
92 | encoding: 'utf8', | 92 | encoding: 'utf8', |
93 | shell: true, | 93 | shell: true, | ... | ... |
-
Please register or login to post a comment