feat: add ip record in telemetry

This commit is contained in:
moonrailgun 2023-11-28 00:45:13 +08:00
parent de844db986
commit 7b519b152f
3 changed files with 4 additions and 0 deletions

View File

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "TelemetrySession" ADD COLUMN "ip" VARCHAR(45);

View File

@ -187,6 +187,7 @@ model TelemetrySession {
hostname String? @db.VarChar(100) hostname String? @db.VarChar(100)
browser String? @db.VarChar(20) browser String? @db.VarChar(20)
os String? @db.VarChar(20) os String? @db.VarChar(20)
ip String? @db.VarChar(45)
country String? @db.Char(2) country String? @db.Char(2)
subdivision1 String? @db.VarChar(20) subdivision1 String? @db.VarChar(20)
subdivision2 String? @db.VarChar(50) subdivision2 String? @db.VarChar(50)

View File

@ -94,6 +94,7 @@ async function findSession(req: Request, url: string) {
hostname, hostname,
browser, browser,
os, os,
ip,
country, country,
subdivision1, subdivision1,
subdivision2, subdivision2,