refactor: some tweaks
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
## To do
|
## To do
|
||||||
|
|
||||||
- [ ] Add user creation in database
|
- [ ] Add user creation in database
|
||||||
|
- [ ] Add middleware for authentication
|
||||||
- [ ] Add user profile and settings (i.e. language)
|
- [ ] Add user profile and settings (i.e. language)
|
||||||
- [ ] Add user roles
|
- [ ] Add user roles
|
||||||
- [ ] Add user permissions
|
- [ ] Add user permissions
|
||||||
|
|||||||
@@ -2,10 +2,8 @@ import { NextResponse } from 'next/server';
|
|||||||
|
|
||||||
import { getSession, withApiAuthRequired } from '@auth0/nextjs-auth0';
|
import { getSession, withApiAuthRequired } from '@auth0/nextjs-auth0';
|
||||||
|
|
||||||
const GET = withApiAuthRequired(async () => {
|
export const GET = withApiAuthRequired(async () => {
|
||||||
const session = await getSession();
|
const session = await getSession();
|
||||||
|
|
||||||
return NextResponse.json(session?.user);
|
return NextResponse.json(session?.user);
|
||||||
});
|
});
|
||||||
|
|
||||||
export { GET };
|
|
||||||
|
|||||||
Reference in New Issue
Block a user