mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-13 09:17:30 -05:00
First Commit
This commit is contained in:
12
backend/controllers/groups.js
Normal file
12
backend/controllers/groups.js
Normal file
@@ -0,0 +1,12 @@
|
||||
var db = require('../db');
|
||||
|
||||
exports.get_groups = function(req, res) {
|
||||
db.get().collection('groups', function(err, grp_coll) {
|
||||
grp_coll.find({
|
||||
'shortName': req.params.shortName.toLowerCase()
|
||||
}).toArray(function(err, grp_results) {
|
||||
res.contentType('json');
|
||||
res.send(JSON.stringify(grp_results));
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user