Skip to content

Commit

Permalink
fix: set user ID in session instead of email
Browse files Browse the repository at this point in the history
  • Loading branch information
ad956 committed Sep 20, 2024
1 parent 068e6e4 commit 1c42d8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middlewares/handleApiRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default async function handleApiRoute(request: NextRequest) {
// attach user info to the request
const requestHeaders = new Headers(request.headers);
requestHeaders.set("x-user-role", userRole);
requestHeaders.set("x-user-email", decryptedToken.user.email);
requestHeaders.set("x-user-id", decryptedToken.user.id);

return NextResponse.next({
request: {
Expand Down

0 comments on commit 1c42d8b

Please sign in to comment.