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:
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ
2026-06-09 15:00:58 +05:30
parent 240e90fe51
commit 14d5c22fc7
+1 -1
View File
@@ -36,7 +36,7 @@ const { getCached, setCache } = require("../helpers/cache");
* @param {function} jsonError - Standardized error response wrapper * @param {function} jsonError - Standardized error response wrapper
* @returns {express.Router} Configured router * @returns {express.Router} Configured router
*/ */
const createApiRoutes = (app, jsonResponse, jsonError) => { const createApiRoutes = (jsonResponse, jsonError) => {
const router = express.Router(); const router = express.Router();
// ══════════════════════════════════════════════════════════════ // ══════════════════════════════════════════════════════════════