diff --git a/app/api/available-years/route.ts b/app/api/locations/available-years/route.ts similarity index 100% rename from app/api/available-years/route.ts rename to app/api/locations/available-years/route.ts diff --git a/app/api/all-locations/route.ts b/app/api/locations/in-year/route.ts similarity index 100% rename from app/api/all-locations/route.ts rename to app/api/locations/in-year/route.ts diff --git a/app/ui/HomePage.tsx b/app/ui/HomePage.tsx index 821366e..091af1b 100644 --- a/app/ui/HomePage.tsx +++ b/app/ui/HomePage.tsx @@ -10,13 +10,13 @@ export interface HomePageProps { } const fetchAllLocations = async (year: number) => { - const response = await fetch(`/api/all-locations/?year=${year}`); + const response = await fetch(`/api/locations/in-year/?year=${year}`); const { locations } : { locations: WithId[] } = await response.json(); return locations; } const fetchAvailableYears = async () => { - const response = await fetch(`/api/available-years/`); + const response = await fetch(`/api/locations/available-years/`); const { availableYears }: { availableYears: number[]} = await response.json(); return availableYears; }