This commit is contained in:
PxlLoewe
2025-04-29 21:35:27 -07:00
parent 0d7f0ad2b8
commit ee49bdde89
12 changed files with 93 additions and 92 deletions

View File

@@ -2,7 +2,7 @@
import { prisma } from "@repo/db";
export const markAsResolved = async (id: number) => {
await prisma.reportMessage.update({
await prisma.report.update({
where: { id: id },
data: { erledigt: true },
});
@@ -20,7 +20,7 @@ export const handleMarkAsResolved = async (id: number) => {
};
export const getReports = async () => {
return prisma.reportMessage.findMany({
return prisma.report.findMany({
include: {
sender: true,
reported: true,
@@ -29,7 +29,7 @@ export const getReports = async () => {
};
export const fetchReportDetails = async (id: number) => {
return prisma.reportMessage.findUnique({
return prisma.report.findUnique({
where: { id },
include: { sender: true, reported: true },
});