feat(analyticsApi): added initDailyAnalyticsAggregates endpoint
Build and Push Docker image / build-and-push (push) Successful in 2m13s Details

This commit is contained in:
Valentin Kolb 2024-11-13 20:52:36 +01:00
parent 179c353f95
commit e32dbbfa0d
1 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ func initPageViewCount(app *pocketbase.PocketBase, e *core.ServeEvent) {
) )
FROM ( FROM (
SELECT SELECT
strftime('%Y-%m-%d', created) AS date, strftime('%m/%d/%Y %H:%M:%S %Z', created) AS date,
COUNT(id) AS daily_count COUNT(id) AS daily_count
FROM analyticsPageViews FROM analyticsPageViews
WHERE WHERE
@ -163,7 +163,7 @@ func initPageViewCount(app *pocketbase.PocketBase, e *core.ServeEvent) {
LIMIT {:perPage} OFFSET {:offset} LIMIT {:perPage} OFFSET {:offset}
`). `).
Bind(dbx.Params{ Bind(dbx.Params{
"startDate": startDate.Format("2006-01-02 15:04:05"), "startDate": startDate,
"perPage": perPage, "perPage": perPage,
"offset": offset, "offset": offset,
}). }).