Merge pull request #2603 from mobeicanyue/patch-3

Fix variable name typo in saveEventData and
This commit is contained in:
Mike Cao 2024-03-13 21:47:27 -07:00 committed by GitHub
commit b37a60727d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ async function relationalQuery(data: {
const jsonKeys = flattenJSON(eventData); const jsonKeys = flattenJSON(eventData);
// id, websiteEventId, eventStringValue // id, websiteEventId, eventStringValue
const flattendData = jsonKeys.map(a => ({ const flattenedData = jsonKeys.map(a => ({
id: uuid(), id: uuid(),
websiteEventId: eventId, websiteEventId: eventId,
websiteId, websiteId,
@ -44,7 +44,7 @@ async function relationalQuery(data: {
})); }));
return prisma.client.eventData.createMany({ return prisma.client.eventData.createMany({
data: flattendData, data: flattenedData,
}); });
} }

View File

@ -14,7 +14,7 @@ export async function saveSessionData(data: {
const jsonKeys = flattenJSON(sessionData); const jsonKeys = flattenJSON(sessionData);
const flattendData = jsonKeys.map(a => ({ const flattenedData = jsonKeys.map(a => ({
id: uuid(), id: uuid(),
websiteId, websiteId,
sessionId, sessionId,
@ -32,7 +32,7 @@ export async function saveSessionData(data: {
}, },
}), }),
client.sessionData.createMany({ client.sessionData.createMany({
data: flattendData as any, data: flattenedData as any,
}), }),
]); ]);
} }