added reports page
This commit is contained in:
19
apps/dispatch/app/querys/report.ts
Normal file
19
apps/dispatch/app/querys/report.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Prisma, Report } from "@repo/db";
|
||||
import { serverApi } from "helpers/axios";
|
||||
|
||||
export const sendReportAPI = async (
|
||||
report:
|
||||
| (Prisma.Without<
|
||||
Prisma.ReportCreateInput,
|
||||
Prisma.ReportUncheckedCreateInput
|
||||
> &
|
||||
Prisma.ReportUncheckedCreateInput)
|
||||
| (Prisma.Without<
|
||||
Prisma.ReportUncheckedCreateInput,
|
||||
Prisma.ReportCreateInput
|
||||
> &
|
||||
Prisma.ReportCreateInput),
|
||||
) => {
|
||||
const repsonse = await serverApi.put("/report", report);
|
||||
return repsonse.data as Report;
|
||||
};
|
||||
Reference in New Issue
Block a user