diff --git a/analyticsApi/main.go b/analyticsApi/main.go index 54d0e0f..8bd2787 100644 --- a/analyticsApi/main.go +++ b/analyticsApi/main.go @@ -123,7 +123,7 @@ func initPageViewCount(app *pocketbase.PocketBase, e *core.ServeEvent) { Last30DaysData []Last30DaysData `json:"last_30_days_data"` } - // Query paginated items + // Query paginated items, sorted by count var items []Item err = app.Dao().DB(). NewQuery(` @@ -158,7 +158,7 @@ func initPageViewCount(app *pocketbase.PocketBase, e *core.ServeEvent) { GROUP BY view.path ORDER BY - path ` + sort + ` + count ` + sort + ` LIMIT {:perPage} OFFSET {:offset} `). Bind(dbx.Params{