From 7a25f0bb3618a1f480e9a26e7e3a41fa3a7a8b46 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 6 May 2014 16:28:31 -0400 Subject: [PATCH] fix for #1496 --- src/controllers/accounts.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/controllers/accounts.js b/src/controllers/accounts.js index 60bba47853..bb5c6a0e05 100644 --- a/src/controllers/accounts.js +++ b/src/controllers/accounts.js @@ -175,14 +175,14 @@ accountsController.getAccount = 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) { - 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 userData; @@ -205,7 +205,7 @@ function getFollow(name, req, res, next) { userData[name] = users; 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.nextStart = favourites.nextStart; - res.render('favourites', userData); + res.render('account/favourites', userData); }); }); });