diff --git a/src/app/api/chapter/[chapterId]/route.schema.ts b/src/app/api/chapter/[chapterId]/route.schema.ts index ae09c954..ac3b529f 100644 --- a/src/app/api/chapter/[chapterId]/route.schema.ts +++ b/src/app/api/chapter/[chapterId]/route.schema.ts @@ -10,5 +10,4 @@ export const deleteChapterResponse = z.discriminatedUnion("code", [ code: z.literal("CHAPTER_NOT_FOUND"), message: z.literal("The chapter id could not be found"), }), - ]); diff --git a/src/app/api/chapter/[chapterId]/route.ts b/src/app/api/chapter/[chapterId]/route.ts index 100180b0..7e6f5a09 100644 --- a/src/app/api/chapter/[chapterId]/route.ts +++ b/src/app/api/chapter/[chapterId]/route.ts @@ -42,11 +42,11 @@ export const DELETE = withSessionAndRole(["ADMIN"], async ({ params }) => { }, data: { SeniorIDs: { - set: [] + set: [], }, position: "", - role: "USER" - } + role: "USER", + }, }); await prisma.chapterRequest.delete({ diff --git a/src/components/AdminHomePage.tsx b/src/components/AdminHomePage.tsx index 07195a43..c505d44d 100644 --- a/src/components/AdminHomePage.tsx +++ b/src/components/AdminHomePage.tsx @@ -37,7 +37,7 @@ const AdminHomePage = ({ chapters }: AdminHomePageProps) => { name: "Remove Chapter", onClick: async () => { const response = await deleteChapter(chapter.id); - router.refresh(); + router.refresh(); }, color: "#ef6767", icon: ,