mirror of
https://github.com/umami-software/umami.git
synced 2026-02-15 18:15:35 +01:00
add distinct id to saves and fix schema mapping
This commit is contained in:
parent
c5efc27c07
commit
de54290af6
6 changed files with 32 additions and 7 deletions
|
|
@ -2,7 +2,19 @@ import { Prisma } from '@prisma/client';
|
|||
import prisma from '@/lib/prisma';
|
||||
|
||||
export async function createSession(data: Prisma.SessionCreateInput) {
|
||||
const { id, websiteId, browser, os, device, screen, language, country, region, city } = data;
|
||||
const {
|
||||
id,
|
||||
websiteId,
|
||||
browser,
|
||||
os,
|
||||
device,
|
||||
screen,
|
||||
language,
|
||||
country,
|
||||
region,
|
||||
city,
|
||||
distinctId,
|
||||
} = data;
|
||||
|
||||
return prisma.client.session.create({
|
||||
data: {
|
||||
|
|
@ -16,6 +28,7 @@ export async function createSession(data: Prisma.SessionCreateInput) {
|
|||
country,
|
||||
region,
|
||||
city,
|
||||
distinctId,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue