diff --git a/app/api/locations/available-years/route.ts b/app/api/locations/available-years/route.ts deleted file mode 100644 index 310dfed..0000000 --- a/app/api/locations/available-years/route.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { fetchAvailableYears } from '@/app/lib/actions/monthActions'; -import { NextResponse } from 'next/server'; - -export async function GET(request: Request) { - - const availableYears = await fetchAvailableYears(); - - return NextResponse.json({ availableYears }); -} \ No newline at end of file diff --git a/app/api/locations/by-id/route.ts b/app/api/locations/by-id/route.ts deleted file mode 100644 index 0696906..0000000 --- a/app/api/locations/by-id/route.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { fetchLocationById } from '@/app/lib/actions/locationActions'; -import { NextResponse } from 'next/server'; - -export const GET = async ( - req: Request, -) => { - const url = new URL(req.url as string); - const locationId = url.searchParams.get('id'); - const location = await fetchLocationById(locationId as string); - - return NextResponse.json({ location }); -} diff --git a/app/api/locations/in-year/route.ts b/app/api/locations/in-year/route.ts deleted file mode 100644 index 3a68065..0000000 --- a/app/api/locations/in-year/route.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { fetchAllLocations } from '@/app/lib/actions/locationActions'; -import { NextResponse } from 'next/server'; - -export const GET = async ( - req: Request, -) => { - // get year from query params - const url = new URL(req.url as string); - const year = parseInt(url.searchParams.get('year') as string, 10); - const locations = await fetchAllLocations(year); - - return NextResponse.json({ locations }); -}