mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 00:56:13 +01:00
feat: allow different slugs
This commit is contained in:
@@ -49,7 +49,7 @@ categoryController.get = async function (req, res, next) {
|
||||
return helpers.notAllowed(req, res);
|
||||
}
|
||||
|
||||
if (!res.locals.isAPI && (!req.params.slug || categoryFields.slug !== `${cid}/${req.params.slug}`) && (categoryFields.slug && categoryFields.slug !== `${cid}/`)) {
|
||||
if (!res.locals.isAPI && !req.params.slug && (categoryFields.slug && categoryFields.slug !== `${cid}/`)) {
|
||||
return helpers.redirect(res, `/category/${categoryFields.slug}`, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user