mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 16:00:26 +01:00
fix for #1496
This commit is contained in:
@@ -175,14 +175,14 @@ accountsController.getAccount = function(req, res, next) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
accountsController.getFollowing = function(req, res, next) {
|
accountsController.getFollowing = function(req, res, next) {
|
||||||
getFollow('following', req, res, next);
|
getFollow('account/following', 'following', req, res, next);
|
||||||
};
|
};
|
||||||
|
|
||||||
accountsController.getFollowers = function(req, res, next) {
|
accountsController.getFollowers = function(req, res, next) {
|
||||||
getFollow('followers', req, res, next);
|
getFollow('account/followers', 'followers', req, res, next);
|
||||||
};
|
};
|
||||||
|
|
||||||
function getFollow(name, req, res, next) {
|
function getFollow(route, name, req, res, next) {
|
||||||
var callerUID = req.user ? parseInt(req.user.uid, 10) : 0;
|
var callerUID = req.user ? parseInt(req.user.uid, 10) : 0;
|
||||||
var userData;
|
var userData;
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ function getFollow(name, req, res, next) {
|
|||||||
userData[name] = users;
|
userData[name] = users;
|
||||||
userData[name + 'Count'] = users.length;
|
userData[name + 'Count'] = users.length;
|
||||||
|
|
||||||
res.render(name, userData);
|
res.render(route, userData);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -240,7 +240,7 @@ accountsController.getFavourites = function(req, res, next) {
|
|||||||
userData.posts = favourites.posts;
|
userData.posts = favourites.posts;
|
||||||
userData.nextStart = favourites.nextStart;
|
userData.nextStart = favourites.nextStart;
|
||||||
|
|
||||||
res.render('favourites', userData);
|
res.render('account/favourites', userData);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user