reafactor: converted the entire thing into a nextjs app
This commit is contained in:
21
app/api/delete-account/route.ts
Normal file
21
app/api/delete-account/route.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
|
||||
export async function POST(request: Request) {
|
||||
try {
|
||||
// valid JSON body check (optional, but good for parsing)
|
||||
const body = await request.json();
|
||||
|
||||
// Log the request for now - placeholder for actual logic
|
||||
console.log('Delete account request received:', body);
|
||||
|
||||
return NextResponse.json(
|
||||
{ message: 'Request received. Account deletion processed.' },
|
||||
{ status: 200 }
|
||||
);
|
||||
} catch (error) {
|
||||
return NextResponse.json(
|
||||
{ error: 'Invalid request body' },
|
||||
{ status: 400 }
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user