mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-20 20:16:26 +02:00
default values
This commit is contained in:
parent
9814217aee
commit
589dfec6df
2 changed files with 8 additions and 18 deletions
|
@ -22,16 +22,6 @@ module.exports = {
|
|||
.contains('/'),
|
||||
body('files.*.content')
|
||||
.isString(),
|
||||
body('compile_timeout')
|
||||
.isNumeric(),
|
||||
body('run_timeout')
|
||||
.isNumeric(),
|
||||
body('stdin')
|
||||
.isString(),
|
||||
body('args')
|
||||
.isArray(),
|
||||
body('args.*')
|
||||
.isString()
|
||||
],
|
||||
|
||||
// POST /jobs
|
||||
|
@ -50,11 +40,11 @@ module.exports = {
|
|||
runtime,
|
||||
alias: req.body.language,
|
||||
files: req.body.files,
|
||||
args: req.body.args,
|
||||
stdin: req.body.stdin,
|
||||
args: req.body.args || [],
|
||||
stdin: req.body.stdin || "",
|
||||
timeouts: {
|
||||
run: req.body.run_timeout,
|
||||
compile: req.body.compile_timeout
|
||||
run: req.body.run_timeout || 3000,
|
||||
compile: req.body.compile_timeout || 10000
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue