20 lines
498 B
TypeScript
20 lines
498 B
TypeScript
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;
|
|
};
|