Manuelle reports
This commit is contained in:
@@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user