Skip to content

Commit

Permalink
pr changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-j-edwards committed Apr 28, 2024
1 parent 59d9361 commit dea786a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
13 changes: 13 additions & 0 deletions src/app/api/chapter/[chapterId]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ export const DELETE = withSessionAndRole(["ADMIN"], async ({ params }) => {
)
);

await prisma.user.updateMany({
where: {
ChapterID: chapterId,
},
data: {
SeniorIDs: {
set: []
},
position: "",
role: "USER"
}
});

await prisma.chapterRequest.delete({
where: {
id: chapter.chapterRequestId,
Expand Down
1 change: 0 additions & 1 deletion src/components/AdminHomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ type AdminHomePageProps = {
};

const AdminHomePage = ({ chapters }: AdminHomePageProps) => {
const userContext = useContext(UserContext);
const router = useRouter();

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/ChapterRequest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const ChapterRequest = (props: ChapterRequestProps) => {
</div>
) : (
<div className="flex justify-center p-2">
<Spinner height={16} width={16} />
<Spinner height={20} width={16} />
</div>
)}
</div>
Expand Down

0 comments on commit dea786a

Please sign in to comment.