chore(deps): update joi and joi-objectid

This commit is contained in:
Oliver Eyton-Williams
2021-05-05 11:11:57 +02:00
committed by Mrugesh Mohapatra
parent 5541b796a3
commit be19823422
4 changed files with 54 additions and 49 deletions

View File

@ -10,7 +10,7 @@ class MongoIds {
}
check(id, title) {
try {
Joi.validate(id, schema);
schema.validate(id);
} catch {
throw new Error(`Expected a valid ObjectId for ${title}, but got ${id}`);
}