From 4bdbdf789d2f82285789bd58da74d3ada3d33ee9 Mon Sep 17 00:00:00 2001 From: nickbar01234 Date: Sun, 28 Apr 2024 13:32:51 -0400 Subject: [PATCH] Fix merge conflicts --- prisma/schema.prisma | 3 --- src/app/api/chapter/[chapterId]/route.ts | 10 +++------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 9892abd6..7b102c5e 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -99,7 +99,6 @@ model Senior { Files File[] ChapterID String @db.ObjectId chapter Chapter @relation(fields: [ChapterID], references: [id], onDelete: Cascade) - chapter Chapter @relation(fields: [ChapterID], references: [id], onDelete: Cascade) } model File { @@ -134,8 +133,6 @@ model ChapterRequest { questions String chapter Chapter? - - chapter Chapter? } model Chapter { diff --git a/src/app/api/chapter/[chapterId]/route.ts b/src/app/api/chapter/[chapterId]/route.ts index 6fce27d5..7e6f5a09 100644 --- a/src/app/api/chapter/[chapterId]/route.ts +++ b/src/app/api/chapter/[chapterId]/route.ts @@ -14,10 +14,6 @@ export const DELETE = withSessionAndRole(["ADMIN"], async ({ params }) => { students: true, seniors: true, }, - include: { - students: true, - seniors: true, - }, }); if (chapter == null) { @@ -46,11 +42,11 @@ export const DELETE = withSessionAndRole(["ADMIN"], async ({ params }) => { }, data: { SeniorIDs: { - set: [] + set: [], }, position: "", - role: "USER" - } + role: "USER", + }, }); await prisma.chapterRequest.delete({