mirror of
https://github.com/Shineii86/MiruroAPI.git
synced 2026-10-22 10:15:10 +00:00
Root cause: createApiRoutes() parameter shift
- Function signature was (app, jsonResponse, jsonError)
- Called from server.js as apiRoutes(jsonResponse, jsonError)
- All params shifted: jsonResponse→jsonError, jsonError→undefined
- Every success response returned {success: false, message: data}
- Health worked because it used res.json() directly
Fix: Removed unused 'app' parameter from createApiRoutes()
All 18 endpoints now return {success: true, results: data}