Skip to content

Commit ce6d079

Browse files
committed
fix: change stdin-->input and stdout-->output
1 parent 72944d1 commit ce6d079

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/routes/api/submit/validators.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export default class RunValidator extends BaseValidator {
3232
.items(
3333
Joi.object({
3434
id: Joi.number().required(),
35-
stdin: Joi.string().uri(),
36-
stdout: Joi.string().uri()
35+
input: Joi.string().uri().required(),
36+
output: Joi.string().uri().required()
3737
})
3838
)
3939
.required()

src/validators/baseValidator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default class BaseValidator {
2020

2121
requestValidator(schema, key = 'body') {
2222
return (req: Request, res: Response, next: NextFunction) => {
23-
const { error } = schema.validate(req[key], { allowUnknown: true })
23+
const { error } = schema.validate(req[key], { allowUnknown: false })
2424
if (error) {
2525
return this.forbid({message: error.details[0].message, code: 400}, res)
2626
}

0 commit comments

Comments
 (0)