feat(analyticsApi): modified sort
Build and Push Docker image / build-and-push (push) Successful in 2m7s
Details
Build and Push Docker image / build-and-push (push) Successful in 2m7s
Details
This commit is contained in:
parent
fe232533c3
commit
72cfd2ba59
|
@ -123,7 +123,7 @@ func initPageViewCount(app *pocketbase.PocketBase, e *core.ServeEvent) {
|
||||||
Last30DaysData []Last30DaysData `json:"last_30_days_data"`
|
Last30DaysData []Last30DaysData `json:"last_30_days_data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Query paginated items
|
// Query paginated items, sorted by count
|
||||||
var items []Item
|
var items []Item
|
||||||
err = app.Dao().DB().
|
err = app.Dao().DB().
|
||||||
NewQuery(`
|
NewQuery(`
|
||||||
|
@ -158,7 +158,7 @@ func initPageViewCount(app *pocketbase.PocketBase, e *core.ServeEvent) {
|
||||||
GROUP BY
|
GROUP BY
|
||||||
view.path
|
view.path
|
||||||
ORDER BY
|
ORDER BY
|
||||||
path ` + sort + `
|
count ` + sort + `
|
||||||
LIMIT {:perPage} OFFSET {:offset}
|
LIMIT {:perPage} OFFSET {:offset}
|
||||||
`).
|
`).
|
||||||
Bind(dbx.Params{
|
Bind(dbx.Params{
|
||||||
|
|
Loading…
Reference in New Issue