From 083cfc28405b4bab60a3b7952554cffec5e016a3 Mon Sep 17 00:00:00 2001 From: Olaf Rosendahl Date: Wed, 22 Nov 2023 18:15:37 +0100 Subject: [PATCH] feat: save pageviews with timezone --- web/app/routes/api.$teamSlug.$projectSlug.pageview.tsx | 3 +-- .../20231122170615_pageview_date_timezone/migration.sql | 2 ++ web/prisma/schema.prisma | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 web/prisma/migrations/20231122170615_pageview_date_timezone/migration.sql diff --git a/web/app/routes/api.$teamSlug.$projectSlug.pageview.tsx b/web/app/routes/api.$teamSlug.$projectSlug.pageview.tsx index 4a87420..718438a 100644 --- a/web/app/routes/api.$teamSlug.$projectSlug.pageview.tsx +++ b/web/app/routes/api.$teamSlug.$projectSlug.pageview.tsx @@ -4,7 +4,6 @@ import type { ActionFunctionArgs } from '@vercel/remix'; import { json } from '@vercel/remix'; import type { UserAgentData } from '~/user-agent'; import { userAgent } from '~/user-agent'; -import { getDate } from '~/utils_api.server'; import { forwardRequestToInternalApi } from '~/utils_edge.server'; import { format } from 'date-fns'; import invariant from 'tiny-invariant'; @@ -42,7 +41,7 @@ const getPageViewNextRequest = async (request: Request): Promise