From dda057c1d626ad273dd475ef47de488a04192ccf Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Wed, 23 Jul 2025 08:51:59 -0500 Subject: [PATCH] Add basic test API without external dependencies --- pages/api/test-basic.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 pages/api/test-basic.js diff --git a/pages/api/test-basic.js b/pages/api/test-basic.js new file mode 100644 index 0000000..c444b88 --- /dev/null +++ b/pages/api/test-basic.js @@ -0,0 +1,22 @@ +export default function handler(req, res) { + // Set CORS headers + res.setHeader('Access-Control-Allow-Origin', '*'); + res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS'); + res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization'); + + // Handle preflight requests + if (req.method === 'OPTIONS') { + res.status(200).end(); + return; + } + + // Simple response without any external dependencies + res.status(200).json({ + success: true, + message: 'Basic API is working!', + timestamp: new Date().toISOString(), + method: req.method, + url: req.url, + headers: Object.keys(req.headers) + }); +} \ No newline at end of file