feat: attempt to register new user
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
|
import { getSession, withApiAuthRequired } from '@auth0/nextjs-auth0';
|
||||||
import prisma from '@prisma/prisma';
|
import prisma from '@prisma/prisma';
|
||||||
import { NextRequest, NextResponse } from 'next/server';
|
import { NextRequest, NextResponse } from 'next/server';
|
||||||
|
|
||||||
export async function POST(request: NextRequest) {
|
export const POST = withApiAuthRequired(async (request: NextRequest) => {
|
||||||
|
const session = await getSession();
|
||||||
|
|
||||||
|
console.log('Session', session);
|
||||||
|
|
||||||
const body = await request.json();
|
const body = await request.json();
|
||||||
console.log('request', request, 'body', body);
|
console.log('request', request, 'body', body);
|
||||||
|
|
||||||
@@ -23,4 +28,4 @@ export async function POST(request: NextRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return NextResponse.json({ message: email });
|
return NextResponse.json({ message: email });
|
||||||
}
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user