chore(deps): update joi and joi-objectid
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
5541b796a3
commit
be19823422
@ -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}`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user