mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01: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…
Add table
Add a link
Reference in a new issue