futher booking stuff

This commit is contained in:
PxlLoewe
2025-09-20 22:16:23 +02:00
parent ba027957ce
commit cf199150fe
8 changed files with 50 additions and 58 deletions

View File

@@ -0,0 +1,14 @@
import { Prisma, Station } from "@repo/db";
import axios from "axios";
export const getStationsAPI = async (filter: Prisma.StationWhereInput) => {
const res = await axios.get<Station[]>("/api/stations", {
params: {
filter: JSON.stringify(filter),
},
});
if (res.status !== 200) {
throw new Error("Failed to fetch stations");
}
return res.data;
};