mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
fix: redirect to /api/world for API requests
This commit is contained in:
@@ -27,7 +27,7 @@ const validSorts = [
|
|||||||
categoryController.get = async function (req, res, next) {
|
categoryController.get = async function (req, res, next) {
|
||||||
const cid = req.params.category_id;
|
const cid = req.params.category_id;
|
||||||
if (cid === '-1') {
|
if (cid === '-1') {
|
||||||
return helpers.redirect(res, `/world?${qs.stringify(req.query)}`);
|
return helpers.redirect(res, `${res.locals.isAPI ? '/api' : ''}/world?${qs.stringify(req.query)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
let currentPage = parseInt(req.query.page, 10) || 1;
|
let currentPage = parseInt(req.query.page, 10) || 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user