From 2076668eab9a8d96638a936a8dc899f371f71623 Mon Sep 17 00:00:00 2001 From: Riccardo Date: Wed, 26 Jun 2024 15:13:31 +0200 Subject: [PATCH] refactor: some tweaks --- README.md | 1 + app/api/protected/profile/route.ts | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a12f842..65d5913 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ ## To do - [ ] Add user creation in database +- [ ] Add middleware for authentication - [ ] Add user profile and settings (i.e. language) - [ ] Add user roles - [ ] Add user permissions diff --git a/app/api/protected/profile/route.ts b/app/api/protected/profile/route.ts index d2726ad..93ea1bf 100644 --- a/app/api/protected/profile/route.ts +++ b/app/api/protected/profile/route.ts @@ -2,10 +2,8 @@ import { NextResponse } from 'next/server'; import { getSession, withApiAuthRequired } from '@auth0/nextjs-auth0'; -const GET = withApiAuthRequired(async () => { +export const GET = withApiAuthRequired(async () => { const session = await getSession(); return NextResponse.json(session?.user); }); - -export { GET };