mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
@@ -145,9 +145,9 @@ topicsController.get = function(req, res, next) {
|
||||
], function (err, data) {
|
||||
if (err) {
|
||||
if (err.message === 'not-enough-privileges') {
|
||||
return res.redirect('403');
|
||||
return res.locals.isAPI ? res.json(403, err.message) : res.redirect('403');
|
||||
} else {
|
||||
return res.redirect('404');
|
||||
return res.locals.isAPI ? res.json(404, 'not-found') : res.redirect('404');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ topicsController.get = function(req, res, next) {
|
||||
|
||||
// Paginator for noscript
|
||||
data.pages = [];
|
||||
for(var x=1;x<=data.pageCount;x++) {
|
||||
for(var x=1; x<=data.pageCount; x++) {
|
||||
data.pages.push({
|
||||
page: x,
|
||||
active: x === parseInt(page, 10)
|
||||
|
||||
Reference in New Issue
Block a user