mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 00:27:11 +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 {
|
try {
|
||||||
const { yup } = req as NextApiRequestQueryBody;
|
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) {
|
} catch (e: any) {
|
||||||
return badRequest(res, e.message);
|
return badRequest(res, e.message);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue