|
|
|
@ -2,6 +2,7 @@ var nconf = require('nconf'),
|
|
|
|
|
fs = require('fs'),
|
|
|
|
|
path = require('path'),
|
|
|
|
|
winston = require('winston'),
|
|
|
|
|
async = require('async'),
|
|
|
|
|
|
|
|
|
|
db = require('./../database'),
|
|
|
|
|
user = require('./../user'),
|
|
|
|
@ -421,9 +422,20 @@ var nconf = require('nconf'),
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
app.get('/groups', function (req, res) {
|
|
|
|
|
async.parallel([
|
|
|
|
|
function(next) {
|
|
|
|
|
groups.list({
|
|
|
|
|
expand: true
|
|
|
|
|
}, function (err, groups) {
|
|
|
|
|
}, next);
|
|
|
|
|
},
|
|
|
|
|
function(next) {
|
|
|
|
|
groups.listSystemGroups({
|
|
|
|
|
expand: true
|
|
|
|
|
}, next);
|
|
|
|
|
}
|
|
|
|
|
], function(err, data) {
|
|
|
|
|
var groups = data[0].concat(data[1]);
|
|
|
|
|
|
|
|
|
|
res.json(200, {
|
|
|
|
|
groups: groups,
|
|
|
|
|
yourid: req.user.uid
|
|
|
|
|