mirror of
https://github.com/BradNut/umami
synced 2025-09-08 17:40:29 +00:00
Remove mandatory validation.
This commit is contained in:
parent
2683ff278a
commit
fb78202139
1 changed files with 1 additions and 1 deletions
|
|
@ -87,7 +87,7 @@ export const useValidate = createMiddleware(async (req: any, res, next) => {
|
|||
try {
|
||||
const { yup } = req as NextApiRequestQueryBody;
|
||||
|
||||
yup[req.method].validateSync({ ...req.query, ...req.body });
|
||||
yup[req.method] && yup[req.method].validateSync({ ...req.query, ...req.body });
|
||||
} catch (e: any) {
|
||||
return badRequest(res, e.message);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue