mirror of
https://github.com/engineer-man/piston.git
synced 2025-06-07 18:56:26 +02:00
Fix validation yet again
This commit is contained in:
parent
2bcd133edf
commit
11b2520189
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ app.post('/execute', (req, res) => {
|
||||||
code: 'missing_source',
|
code: 'missing_source',
|
||||||
message: 'source field is invalid',
|
message: 'source field is invalid',
|
||||||
});
|
});
|
||||||
} else if (body.args && Array.isArray(body.args)) {
|
} else if (body.args && !Array.isArray(body.args)) {
|
||||||
return res.status(400).json({
|
return res.status(400).json({
|
||||||
code: 'invalid_args',
|
code: 'invalid_args',
|
||||||
message: 'args field is not an array',
|
message: 'args field is not an array',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue