mirror of
https://github.com/umami-software/umami.git
synced 2026-02-15 10:05:36 +01:00
Fixed destructure error.
This commit is contained in:
parent
25feee662b
commit
39562d4a64
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue