You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
555 B
JavaScript

11 years ago
"use strict";
var groups = require('../groups'),
groupsController = {};
groupsController.list = function(req, res) {
groups.list({
truncateUserList: true,
expand: true
}, function(err, groups) {
console.log(groups);
res.render('groups/list', {
groups: groups
});
});
};
groupsController.details = function(req, res) {
groups.get(req.params.name, {
expand: true
}, function(err, groupObj) {
if (!err) {
res.render('groups/details', groupObj);
} else {
res.redirect('404');
}
});
};
11 years ago
module.exports = groupsController;