mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-11 00:07:30 -05:00
12 lines
340 B
JavaScript
12 lines
340 B
JavaScript
var db = require('../db');
|
|
|
|
exports.get_groups = async function (req, res) {
|
|
|
|
const grp_coll = db.get().collection('groups');
|
|
const cursor = grp_coll.find({ 'shortName': req.params.shortName.toLowerCase() });
|
|
const grp_results = await cursor.toArray();
|
|
|
|
res.contentType('json');
|
|
res.send(JSON.stringify(grp_results));
|
|
}
|