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); 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,
}), }),
]); ]);
} }