From 09bb380da6e471f8cd44b65bff9211617874199b Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Wed, 23 Jul 2025 08:22:39 -0500 Subject: [PATCH] Add simple test API to isolate the issue --- api/test.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 api/test.js diff --git a/api/test.js b/api/test.js new file mode 100644 index 0000000..45284a1 --- /dev/null +++ b/api/test.js @@ -0,0 +1,35 @@ +import { NextResponse } from 'next/server'; + +export async function GET(request) { + try { + return NextResponse.json({ + success: true, + message: 'Test API is working!', + timestamp: new Date().toISOString() + }); + } catch (error) { + console.error('❌ Error in test API:', error); + return NextResponse.json( + { error: 'Test API failed', details: error.message }, + { status: 500 } + ); + } +} + +export async function POST(request) { + try { + const body = await request.json(); + return NextResponse.json({ + success: true, + message: 'Test POST API is working!', + receivedData: body, + timestamp: new Date().toISOString() + }); + } catch (error) { + console.error('❌ Error in test POST API:', error); + return NextResponse.json( + { error: 'Test POST API failed', details: error.message }, + { status: 500 } + ); + } +} \ No newline at end of file