mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-03 04:00:41 +08:00
added body validation
This commit is contained in:
parent
cb3f1ee1b0
commit
6bdf6de1f6
1 changed files with 8 additions and 2 deletions
|
@ -51,8 +51,14 @@ router.patch(
|
|||
RateLimit.resultsTagsUpdate,
|
||||
validateRequest({
|
||||
body: {
|
||||
tagIds: joi.array().items(joi.string()).required(),
|
||||
resultId: joi.string().required(),
|
||||
tagIds: joi
|
||||
.array()
|
||||
.items(joi.string().regex(/^[a-f\d]{24}$/i))
|
||||
.required(),
|
||||
resultId: joi
|
||||
.string()
|
||||
.regex(/^[a-f\d]{24}$/i)
|
||||
.required(),
|
||||
},
|
||||
}),
|
||||
asyncHandler(ResultController.updateTags)
|
||||
|
|
Loading…
Add table
Reference in a new issue