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:
@@ -23,7 +23,7 @@
|
||||
async function fetchServices() {
|
||||
servicesLoading = true;
|
||||
try {
|
||||
const response = await apiFetch('/api/services', {
|
||||
const response = await apiFetch('/api/services/popular', {
|
||||
method: 'GET',
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user