Fix jwt-token

This commit is contained in:
2025-09-16 08:08:12 +02:00
parent f8fcfbb5be
commit 551a043ab3

View File

@@ -3,7 +3,8 @@ function validateRequest(schema, source = 'body') {
const dataToValidate = req[source]; const dataToValidate = req[source];
const { error, value } = schema.validate(dataToValidate, { const { error, value } = schema.validate(dataToValidate, {
abortEarly: false, abortEarly: false,
stripUnknown: true stripUnknown: true,
convert: true // Enable type coercion (e.g., '123' -> 123)
}); });
if (error) { if (error) {