Manuelle reports

This commit is contained in:
PxlLoewe
2025-07-27 13:45:13 -07:00
parent 453ad28538
commit 89a0eb7135
6 changed files with 163 additions and 12 deletions

View File

@@ -1,10 +1,7 @@
"use server";
import { Prisma, prisma } from "@repo/db";
export const editReport = async (
id: number,
data: Prisma.ReportUncheckedUpdateInput,
) => {
export const editReport = async (id: number, data: Prisma.ReportUncheckedUpdateInput) => {
return await prisma.report.update({
where: {
id: id,
@@ -12,3 +9,11 @@ export const editReport = async (
data,
});
};
export const createReport = async (
data: Prisma.XOR<Prisma.ReportCreateInput, Prisma.ReportUncheckedCreateInput>,
) => {
return await prisma.report.create({
data,
});
};