From cb8b14b9103cc90c3d09f65863b5d28d24f9af6c Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Mon, 9 Oct 2023 00:06:20 +0800 Subject: [PATCH] refactor: add ip record in website session --- prisma/schema.prisma | 1 + src/server/model/website.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 3a0616a..279936d 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -83,6 +83,7 @@ model WebsiteSession { device String? @db.VarChar(20) screen String? @db.VarChar(11) language String? @db.VarChar(35) + ip String? @db.VarChar(20) country String? @db.Char(2) subdivision1 String? @db.VarChar(20) subdivision2 String? @db.VarChar(50) diff --git a/src/server/model/website.ts b/src/server/model/website.ts index 30d9ff3..a7708aa 100644 --- a/src/server/model/website.ts +++ b/src/server/model/website.ts @@ -109,6 +109,7 @@ export async function findSession(req: Request): Promise<{ device, screen, language, + ip, country, subdivision1, subdivision2,