refactor: renamed API dirs
This commit is contained in:
@@ -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<BillingLocation>[] } = 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user