This commit is contained in:
Joseph J Helfenbein
2025-01-25 03:41:37 -05:00
parent 5261096bba
commit 21f5a83edf

View File

@@ -13,16 +13,17 @@ async function connectDB() {
const CLERK_WEBHOOK_SECRET = process.env.CLERK_WEBHOOK_SECRET; const CLERK_WEBHOOK_SECRET = process.env.CLERK_WEBHOOK_SECRET;
if (!CLERK_WEBHOOK_SECRET) {
export async function POST(req) {
console.log('Received request:', req);
if (!CLERK_WEBHOOK_SECRET) {
console.error('CLERK_WEBHOOK_SECRET is missing'); console.error('CLERK_WEBHOOK_SECRET is missing');
return NextResponse.json( return NextResponse.json(
{ message: 'Internal server error: Secret missing' }, { message: 'Internal server error: Secret missing' },
{ status: 500 } { status: 500 }
); );
} }
export async function POST(req) {
console.log('Received request:', req);
if (req.method !== 'POST') { if (req.method !== 'POST') {
return NextResponse.json( return NextResponse.json(