✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Express
Дано middleware:
export function validate(schema) {
return (req, res, next) => {
req.body = schema.parse(req.body);
next();
};
}
Що станеться, якщо req.body не пройде валідації?