Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Check for payload.

Mike Caoa7ea2027853b
diff --git a/src/pages/api/send.ts b/src/pages/api/send.ts
index a379f261f..56a748e13 100644
--- a/src/pages/api/send.ts
+++ b/src/pages/api/send.ts
@@ -79,6 +79,10 @@ export default async (req: NextApiRequestCollect, res: NextApiResponse) => {
const { type, payload } = getJsonBody<CollectRequestBody>(req);
+ if (!type || !payload) {
+ return badRequest(res);
+ }
+
req.yup = schema;
await useValidate(req, res);