Fix variable name typo in saveEventData and

saveSessionData
This commit is contained in:
mobeicanyue 2024-03-14 12:38:12 +08:00
parent ba86716a82
commit 2182fa4e9b
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ async function relationalQuery(data: {
const jsonKeys = flattenJSON(eventData);
// id, websiteEventId, eventStringValue
const flattendData = jsonKeys.map(a => ({
const flattenedData = jsonKeys.map(a => ({
id: uuid(),
websiteEventId: eventId,
websiteId,
@ -44,7 +44,7 @@ async function relationalQuery(data: {
}));
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 flattendData = jsonKeys.map(a => ({
const flattenedData = jsonKeys.map(a => ({
id: uuid(),
websiteId,
sessionId,
@ -32,7 +32,7 @@ export async function saveSessionData(data: {
},
}),
client.sessionData.createMany({
data: flattendData as any,
data: flattenedData as any,
}),
]);
}