mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
first pass #992
This commit is contained in:
@@ -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) {
|
||||
groups.list({
|
||||
expand: true
|
||||
}, function (err, groups) {
|
||||
async.parallel([
|
||||
function(next) {
|
||||
groups.list({
|
||||
expand: true
|
||||
}, 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
|
||||
|
||||
Reference in New Issue
Block a user