Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Sep 18, 2020
1 parent 220297d commit 22cd265
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/controllers/category.js
Expand Up @@ -34,10 +34,12 @@ categoryController.get = async function (req, res, next) {

if (!categoryFields.slug ||
(categoryFields && categoryFields.disabled) ||
(userSettings.usePagination && currentPage < 1) ||
topicIndex < 0) {
(userSettings.usePagination && currentPage < 1)) {
return next();
}
if (topicIndex < 0) {
return helpers.redirect(res, '/category/' + categoryFields.slug);
}

if (!userPrivileges.read) {
return helpers.notAllowed(req, res);
Expand Down

0 comments on commit 22cd265

Please sign in to comment.