This commit is contained in:
barisusakli
2015-08-28 14:31:35 -04:00
parent bdfb168f2f
commit 25502f0687
13 changed files with 114 additions and 205 deletions

View File

@@ -50,7 +50,7 @@ groupsController.list = function(req, res, next) {
});
};
groupsController.get = function(req, res, next) {
groupsController.get = function(req, res, callback) {
var groupName = req.params.name;
async.waterfall([
function(next){
@@ -58,13 +58,13 @@ groupsController.get = function(req, res, next) {
},
function(exists, next) {
if (!exists) {
return helpers.notFound(req, res);
return callback();
}
groups.get(groupName, {uid: req.uid}, next);
}
], function(err, group) {
if (err) {
return next(err);
return callback(err);
}
res.render('admin/manage/group', {group: group});
});