From a5d59339f9c4a17635f86d85d88ee2aaa85e01f3 Mon Sep 17 00:00:00 2001 From: Keith Stevens Date: Wed, 18 Jan 2023 15:33:27 +0900 Subject: [PATCH] Deleting some function arguments used for debugging --- website/src/pages/api/auth/[...nextauth].ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/pages/api/auth/[...nextauth].ts b/website/src/pages/api/auth/[...nextauth].ts index 6c6ac21c..3d3dbaa4 100644 --- a/website/src/pages/api/auth/[...nextauth].ts +++ b/website/src/pages/api/auth/[...nextauth].ts @@ -88,7 +88,7 @@ export const authOptions: AuthOptions = { * Ensure we propagate the user's role when creating the session from the * token. */ - async session({ session, user, token }) { + async session({ session, token }) { session.user.role = token.role; session.user.isNew = token.isNew; session.user.name = token.name; @@ -98,7 +98,7 @@ export const authOptions: AuthOptions = { * When creating a token, fetch the user's role and inject it in the token. * This let's use forward the role to the session object. */ - async jwt({ token, user, account }) { + async jwt({ token }) { const { isNew, name, role } = await prisma.user.findUnique({ where: { id: token.sub }, select: { name: true, role: true, isNew: true },