feat: sort price list by booking popularity over last 6 months

Adds GET /api/services/popular endpoint that returns services sorted by booking count (desc) then price (desc) for ties. Prices page now fetches from this endpoint instead of the default alphabetical sort.
This commit is contained in:
2026-08-22 00:34:49 +01:00
parent 8384197ef0
commit 3c0c4dd962
3 changed files with 69 additions and 1 deletions
+1
View File
@@ -262,6 +262,7 @@ func main() {
r.Use(mw.RateLimit(120, time.Minute))
r.Use(mw.OptionalAuth)
r.Get("/services", services.ServicesHandler)
r.Get("/services/popular", services.PopularServicesHandler)
r.Get("/services/eligible-for/{user_id}", services.ServicesEligibleForUserHandler)
})