Skip to content

Commit

Permalink
deleted seniors, request, and chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-j-edwards authored and nickbar01234 committed Apr 28, 2024
1 parent dea786a commit afebb72
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/app/api/chapter/[chapterId]/route.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
}),

]);
6 changes: 3 additions & 3 deletions src/app/api/chapter/[chapterId]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ export const DELETE = withSessionAndRole(["ADMIN"], async ({ params }) => {
},
data: {
SeniorIDs: {
set: []
set: [],
},
position: "",
role: "USER"
}
role: "USER",
},
});

await prisma.chapterRequest.delete({
Expand Down
2 changes: 1 addition & 1 deletion src/components/AdminHomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: <FontAwesomeIcon icon={faTrashCan} />,
Expand Down

0 comments on commit afebb72

Please sign in to comment.