Fix validation yet again
This commit is contained in:
parent
2bcd133edf
commit
11b2520189
|
@ -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…
Reference in New Issue