mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-21 04:26:28 +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',
|
||||
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({
|
||||
code: 'invalid_args',
|
||||
message: 'args field is not an array',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue