This commit is contained in:
Mike Cao 2023-08-25 21:22:17 -07:00
commit 8e373f7444
2 changed files with 3 additions and 3 deletions

View File

@ -138,8 +138,8 @@ async function clickhouseQuery(data: {
session_id: sessionId,
event_id: uuid(),
country: country ? country : null,
subdivision1: country && subdivision1 ? `${country}-${subdivision1}` : null,
subdivision2: subdivision2 ? subdivision2 : null,
subdivision1: subdivision1 ?? null,
subdivision2: subdivision2 ?? null,
city: city ? city : null,
url_path: urlPath?.substring(0, URL_LENGTH),
url_query: urlQuery?.substring(0, URL_LENGTH),

View File

@ -30,7 +30,7 @@ export async function createSession(data: Prisma.SessionCreateInput) {
screen,
language,
country,
subdivision1: country && subdivision1 ? `${country}-${subdivision1}` : null,
subdivision1,
subdivision2,
city,
},