added heliport layer

This commit is contained in:
PxlLoewe
2025-07-16 00:49:25 -07:00
parent 959ae37213
commit f69fa37b2a
3 changed files with 236 additions and 2 deletions

View File

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