|
|
|
@ -27,6 +27,8 @@ groupsController.list = function(req, res, next) {
|
|
|
|
|
groupsController.details = function(req, res, next) {
|
|
|
|
|
var uid = req.user ? parseInt(req.user.uid, 10) : 0;
|
|
|
|
|
|
|
|
|
|
groups.existsBySlug(req.params.slug, function(err, exists) {
|
|
|
|
|
if (exists) {
|
|
|
|
|
async.parallel({
|
|
|
|
|
group: function(next) {
|
|
|
|
|
groups.getByGroupslug(req.params.slug, {
|
|
|
|
@ -48,6 +50,10 @@ groupsController.details = function(req, res, next) {
|
|
|
|
|
|
|
|
|
|
res.render('groups/details', results);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
return res.locals.isAPI ? res.status(302).json('/groups') : res.redirect('/groups');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
groupsController.members = function(req, res, next) {
|
|
|
|
|