feat(query): include session totals and stable framework names
This commit is contained in:
@@ -207,6 +207,15 @@ func main() {
|
||||
if nextCursor != nil {
|
||||
resp["next_cursor"] = nextCursor.Format(time.RFC3339Nano)
|
||||
}
|
||||
|
||||
// Include total count on the first page (no cursor) so the UI can show "X of Y"
|
||||
if f.Cursor == nil {
|
||||
total, err := db.CountSessions(r.Context(), f)
|
||||
if err == nil {
|
||||
resp["total"] = total
|
||||
}
|
||||
}
|
||||
|
||||
httpx.WriteJSON(w, http.StatusOK, resp)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user