a looooot

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-02-22 21:50:30 +01:00
parent 1d800835b8
commit 9c92803c4c
61 changed files with 2689 additions and 681 deletions

View File

@@ -12,12 +12,12 @@ export async function createSessionEnd(
const sql = `
SELECT * FROM events
WHERE
profile_id = '${payload.profileId}'
device_id = '${payload.deviceId}'
AND created_at >= (
SELECT created_at
FROM events
WHERE
profile_id = '${payload.profileId}'
device_id = '${payload.deviceId}'
AND name = 'session_start'
ORDER BY created_at DESC
LIMIT 1
@@ -33,6 +33,7 @@ export async function createSessionEnd(
`Index: ${index}`,
`Event: ${event.name}`,
`Created: ${event.createdAt.toISOString()}`,
`DeviceId: ${event.deviceId}`,
`Profile: ${event.profileId}`,
`Path: ${event.path}`,
].join('\n')