mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-07 18:08:04 +01:00
Fixed destructure error.
This commit is contained in:
parent
25feee662b
commit
39562d4a64
@ -116,7 +116,7 @@ export default async (req: NextApiRequestCollect, res: NextApiResponse) => {
|
||||
};
|
||||
|
||||
function validateBody(res: NextApiResponse, { type, payload }: CollectRequestBody) {
|
||||
const { data } = payload;
|
||||
const { data } = payload || {};
|
||||
|
||||
// Validate type
|
||||
if (type !== COLLECTION_TYPE.event && type !== COLLECTION_TYPE.identify) {
|
||||
|
Loading…
Reference in New Issue
Block a user