First Commit

This commit is contained in:
Luke Berndt
2020-06-09 22:11:11 -04:00
parent 8f49aa463c
commit 3b0d3f290f
551 changed files with 193130 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
var db = require('../db');
exports.get_talkgroups = function(req, res) {
db.get().collection('talkgroups', function(err, tg_coll) {
tg_coll.find({
'shortName': req.params.shortName.toLowerCase()
}).toArray(function(err, tg_results) {
var talkgroups = {};
for (var tg in tg_results) {
talkgroups[tg_results[tg].num] = tg_results[tg];
}
res.contentType('json');
res.send(JSON.stringify({
talkgroups: talkgroups
}));
});
});
}