mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 16:17:13 +01:00
Update useValidate calls.
This commit is contained in:
parent
5e3c135388
commit
0d9b6e8355
37 changed files with 38 additions and 106 deletions
|
|
@ -37,9 +37,7 @@ export default async (
|
|||
}
|
||||
|
||||
await useAuth(req, res);
|
||||
|
||||
req.yup = schema;
|
||||
await useValidate(req, res);
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
const { currentPassword, newPassword } = req.body;
|
||||
const { id } = req.auth.user;
|
||||
|
|
|
|||
|
|
@ -21,9 +21,7 @@ export default async (
|
|||
res: NextApiResponse,
|
||||
) => {
|
||||
await useCors(req, res);
|
||||
|
||||
req.yup = schema;
|
||||
await useValidate(req, res);
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
if (req.method === 'GET') {
|
||||
req.query.id = req.auth.user.id;
|
||||
|
|
|
|||
|
|
@ -22,9 +22,7 @@ export default async (
|
|||
) => {
|
||||
await useCors(req, res);
|
||||
await useAuth(req, res);
|
||||
|
||||
req.yup = schema;
|
||||
await useValidate(req, res);
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
if (req.method === 'GET') {
|
||||
req.query.id = req.auth.user.id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue