From 72cfd2ba598e96877ad550179d742c06542090d8 Mon Sep 17 00:00:00 2001 From: valentinkolb Date: Wed, 13 Nov 2024 01:14:18 +0100 Subject: [PATCH] feat(analyticsApi): modified sort --- analyticsApi/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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{