mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
Updated session data properties.
This commit is contained in:
parent
f279254af5
commit
dfaeedbc09
1 changed files with 4 additions and 4 deletions
|
|
@ -32,7 +32,7 @@ export async function relationalQuery(data: {
|
||||||
id: uuid(),
|
id: uuid(),
|
||||||
websiteId,
|
websiteId,
|
||||||
sessionId,
|
sessionId,
|
||||||
sessionKey: a.key,
|
dataKey: a.key,
|
||||||
stringValue: getStringValue(a.value, a.dataType),
|
stringValue: getStringValue(a.value, a.dataType),
|
||||||
numberValue: a.dataType === DATA_TYPE.number ? a.value : null,
|
numberValue: a.dataType === DATA_TYPE.number ? a.value : null,
|
||||||
dateValue: a.dataType === DATA_TYPE.date ? new Date(a.value) : null,
|
dateValue: a.dataType === DATA_TYPE.date ? new Date(a.value) : null,
|
||||||
|
|
@ -46,13 +46,13 @@ export async function relationalQuery(data: {
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
sessionId: true,
|
sessionId: true,
|
||||||
sessionKey: true,
|
dataKey: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const data of flattenedData) {
|
for (const data of flattenedData) {
|
||||||
const { sessionId, sessionKey, ...props } = data;
|
const { sessionId, dataKey, ...props } = data;
|
||||||
const record = existing.find(e => e.sessionId === sessionId && e.sessionKey === sessionKey);
|
const record = existing.find(e => e.sessionId === sessionId && e.dataKey === dataKey);
|
||||||
|
|
||||||
if (record) {
|
if (record) {
|
||||||
await client.sessionData.update({
|
await client.sessionData.update({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue