From 0c93944d8a2eb9fc4a357349bb6cc2bb75e509dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Gerhard=20Lindesva=CC=88rd?= Date: Wed, 25 Sep 2024 20:57:54 +0200 Subject: [PATCH] fix(api): spread profile payload correctly --- apps/api/src/controllers/track.controller.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/api/src/controllers/track.controller.ts b/apps/api/src/controllers/track.controller.ts index e326cf06..dca57a45 100644 --- a/apps/api/src/controllers/track.controller.ts +++ b/apps/api/src/controllers/track.controller.ts @@ -4,7 +4,6 @@ import { parseUserAgent } from '@/utils/parseUserAgent'; import type { FastifyReply, FastifyRequest } from 'fastify'; import { path, assocPath, pathOr, pick } from 'ramda'; -import { toISOString } from '@openpanel/common'; import { generateDeviceId } from '@openpanel/common/server'; import { createProfileAlias, @@ -246,6 +245,7 @@ async function identify({ }) { const uaInfo = parseUserAgent(ua); await upsertProfile({ + ...payload, id: payload.profileId, isExternal: true, projectId, @@ -254,7 +254,6 @@ async function identify({ ...(geo ?? {}), ...uaInfo, }, - ...payload, }); }