From e32dbbfa0da715e030d569b29b42049932e00625 Mon Sep 17 00:00:00 2001 From: valentinkolb Date: Wed, 13 Nov 2024 20:52:36 +0100 Subject: [PATCH] feat(analyticsApi): added initDailyAnalyticsAggregates endpoint --- analyticsApi/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/analyticsApi/main.go b/analyticsApi/main.go index c42f357..17e8665 100644 --- a/analyticsApi/main.go +++ b/analyticsApi/main.go @@ -147,7 +147,7 @@ func initPageViewCount(app *pocketbase.PocketBase, e *core.ServeEvent) { ) FROM ( SELECT - strftime('%Y-%m-%d', created) AS date, + strftime('%m/%d/%Y %H:%M:%S %Z', created) AS date, COUNT(id) AS daily_count FROM analyticsPageViews WHERE @@ -163,7 +163,7 @@ func initPageViewCount(app *pocketbase.PocketBase, e *core.ServeEvent) { LIMIT {:perPage} OFFSET {:offset} `). Bind(dbx.Params{ - "startDate": startDate.Format("2006-01-02 15:04:05"), + "startDate": startDate, "perPage": perPage, "offset": offset, }).