Fix jwt-token
This commit is contained in:
@@ -3,7 +3,8 @@ function validateRequest(schema, source = 'body') {
|
||||
const dataToValidate = req[source];
|
||||
const { error, value } = schema.validate(dataToValidate, {
|
||||
abortEarly: false,
|
||||
stripUnknown: true
|
||||
stripUnknown: true,
|
||||
convert: true // Enable type coercion (e.g., '123' -> 123)
|
||||
});
|
||||
|
||||
if (error) {
|
||||
|
||||
Reference in New Issue
Block a user