more err checks

v1.18.x
barisusakli 10 years ago
parent 18462c4190
commit 9909f8ba79

@ -137,6 +137,9 @@ accountsController.getUserByUID = function(req, res, next) {
var uid = req.params.uid ? req.params.uid : 0;
user.getUserData(uid, function(err, userData) {
if (err) {
return next(err);
}
res.json(userData);
});
};

@ -5,11 +5,14 @@ var groups = require('../groups'),
nconf = require('nconf'),
groupsController = {};
groupsController.list = function(req, res) {
groupsController.list = function(req, res, next) {
groups.list({
truncateUserList: true,
expand: true
}, function(err, groups) {
if (err) {
return next(err);
}
res.render('groups/list', {
groups: groups
});

Loading…
Cancel
Save