mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-08 02:18:25 +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) {
|
function validateBody(res: NextApiResponse, { type, payload }: CollectRequestBody) {
|
||||||
const { data } = payload;
|
const { data } = payload || {};
|
||||||
|
|
||||||
// Validate type
|
// Validate type
|
||||||
if (type !== COLLECTION_TYPE.event && type !== COLLECTION_TYPE.identify) {
|
if (type !== COLLECTION_TYPE.event && type !== COLLECTION_TYPE.identify) {
|
||||||
|
Loading…
Reference in New Issue
Block a user