mirror of
https://github.com/Shineii86/MiruroAPI.git
synced 2026-10-22 18:25:11 +00:00
fix: remove unused 'app' param from createApiRoutes to fix jsonError/jsonResponse parameter shift
The function signature was (app, jsonResponse, jsonError) but called
with (jsonResponse, jsonError) from server.js, causing all parameters
to shift by one. jsonResponse() was actually calling jsonError(),
returning {success: false, message: data} instead of
{success: true, results: data}.
This commit is contained in:
@@ -36,7 +36,7 @@ const { getCached, setCache } = require("../helpers/cache");
|
||||
* @param {function} jsonError - Standardized error response wrapper
|
||||
* @returns {express.Router} Configured router
|
||||
*/
|
||||
const createApiRoutes = (app, jsonResponse, jsonError) => {
|
||||
const createApiRoutes = (jsonResponse, jsonError) => {
|
||||
const router = express.Router();
|
||||
|
||||
// ══════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user