diff --git a/package.json b/package.json index b3b3bc22..4162ebc0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cadt", - "version": "1.6.8", + "version": "1.6.10", "_comment": "DONT CHANGE MAJOR UNLESS DATAMODEL CHANGES: The major version corresponds to the datamodel version your using, so 2.0.0 means it'll use datamodel v2", "private": true, "bin": "build/server.js", diff --git a/src/controllers/project.controller.js b/src/controllers/project.controller.js index 3db3872a..28f577b2 100644 --- a/src/controllers/project.controller.js +++ b/src/controllers/project.controller.js @@ -127,22 +127,6 @@ export const findAll = async (req, res) => { order, } = req.query; - if (!page) { - let redirectUrl = `${req.baseUrl}?page=1&limit=10`; - - if (Object.keys(req.query).length > 0) { - redirectUrl = redirectUrl.concat( - '&', - Object.keys(req.query) - .map((key) => `${key}=${req.query[key]}`) - .join('&'), - ); - } - - // Redirect to the modified URL - return res.redirect(301, redirectUrl); - } - let where = orgUid != null && orgUid !== 'all' ? { orgUid } : undefined; if (filter) { diff --git a/src/controllers/units.controller.js b/src/controllers/units.controller.js index 133dda0c..3d103ba0 100644 --- a/src/controllers/units.controller.js +++ b/src/controllers/units.controller.js @@ -133,22 +133,6 @@ export const findAll = async (req, res) => { filter, } = req.query; - if (!page) { - let redirectUrl = `${req.baseUrl}?page=1&limit=10`; - - if (Object.keys(req.query).length > 0) { - redirectUrl = redirectUrl.concat( - '&', - Object.keys(req.query) - .map((key) => `${key}=${req.query[key]}`) - .join('&'), - ); - } - - // Redirect to the modified URL - return res.redirect(301, redirectUrl); - } - let where = orgUid != null && orgUid !== 'all' ? { orgUid } : undefined; if (filter) {