Trim output

This commit is contained in:
Vrganj 2021-01-15 22:13:29 +01:00
parent bbbea5045a
commit a2457edc6f
1 changed files with 4 additions and 6 deletions

View File

@ -95,13 +95,11 @@ async function launch(res, language, body) {
result.output += chunk;
});
result.stderr = result.stderr.substring(0, 65535);
result.stdout = result.stdout.substring(0, 65535);
result.output = result.output.substring(0, 65535);
result.stderr = result.stderr.trim().substring(0, 65535);
result.stdout = result.stdout.trim().substring(0, 65535);
result.output = result.output.trim().substring(0, 65535);
process.on('exit', () => {
res.json(result);
});
process.on('exit', () => res.json(result));
}
app.get('/versions', (req, res) => {