mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 16:45:35 +01:00
Check for payload.
This commit is contained in:
parent
fac306328d
commit
a7ea202785
1 changed files with 4 additions and 0 deletions
|
|
@ -79,6 +79,10 @@ export default async (req: NextApiRequestCollect, res: NextApiResponse) => {
|
||||||
|
|
||||||
const { type, payload } = getJsonBody<CollectRequestBody>(req);
|
const { type, payload } = getJsonBody<CollectRequestBody>(req);
|
||||||
|
|
||||||
|
if (!type || !payload) {
|
||||||
|
return badRequest(res);
|
||||||
|
}
|
||||||
|
|
||||||
req.yup = schema;
|
req.yup = schema;
|
||||||
await useValidate(req, res);
|
await useValidate(req, res);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue