From 5b70b6c35cc021ab84df6e96a26791f5881ef29f Mon Sep 17 00:00:00 2001 From: Keith Stevens Date: Mon, 9 Jan 2023 15:34:45 +0900 Subject: [PATCH] Revert "Adding some debug stuff on admin" This reverts commit 2ca2abf4c193f6b9e95371989a96ab4d161fc7b8. --- website/src/pages/admin/index.tsx | 1 - website/src/pages/api/auth/[...nextauth].ts | 4 ---- 2 files changed, 5 deletions(-) diff --git a/website/src/pages/admin/index.tsx b/website/src/pages/admin/index.tsx index 7bfdad63..9cbea222 100644 --- a/website/src/pages/admin/index.tsx +++ b/website/src/pages/admin/index.tsx @@ -22,7 +22,6 @@ const AdminIndex = () => { if (status === "loading") { return; } - console.log("checking role: " + session?.user?.role); if (session?.user?.role === "admin") { return; } diff --git a/website/src/pages/api/auth/[...nextauth].ts b/website/src/pages/api/auth/[...nextauth].ts index 4108d53c..363c1404 100644 --- a/website/src/pages/api/auth/[...nextauth].ts +++ b/website/src/pages/api/auth/[...nextauth].ts @@ -69,8 +69,6 @@ const adminUserMap = process.env.ADMIN_USERS.split(",").reduce((result, entry) = result.set(authType, s); return result; }, new Map()); -console.log(adminUserMap); -console.log(process.env.ADMIN_USERS); export const authOptions: AuthOptions = { // Ensure we can store user data in a database. @@ -99,7 +97,6 @@ export const authOptions: AuthOptions = { where: { id: token.sub }, select: { role: true }, }); - console.log("found role: " + role); token.role = role; return token; }, @@ -121,7 +118,6 @@ export const authOptions: AuthOptions = { // Update the database if the user is an admin. if (adminForAccountType.has(account.providerAccountId)) { - console.log("updating admin"); await prisma.user.update({ data: { role: "admin",