mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 08:47:40 -05:00
fewer routes
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
const Group = require("../models/group");
|
||||
|
||||
exports.get_groups = async function (req, res) {
|
||||
process.nextTick(async function () {
|
||||
const grp_results = await Group.find({ shortName: req.params.shortName.toLowerCase()}).sort("position").catch(err => {
|
||||
console.error(err);
|
||||
res.status(500);
|
||||
@@ -11,5 +10,4 @@ exports.get_groups = async function (req, res) {
|
||||
|
||||
res.contentType('json');
|
||||
res.send(JSON.stringify(grp_results));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ function addSystemClients(req, res, next) {
|
||||
|
||||
|
||||
/*------ CALLS ----------*/
|
||||
|
||||
/*
|
||||
app.get('/card/:id', calls.get_card);
|
||||
app.post('/add_star/:id', calls.add_star);
|
||||
app.post('/remove_star/:id', calls.remove_star);
|
||||
@@ -106,7 +106,7 @@ app.get('/:shortName/calls/next', calls.get_next_calls);
|
||||
app.get('/:shortName/calls/newer', calls.get_newer_calls);
|
||||
app.get('/:shortName/calls/older', calls.get_older_calls);
|
||||
app.get('/:shortName/calls/:time/older', calls.get_iphone_calls);
|
||||
app.get('/:shortName/calls', calls.get_calls);
|
||||
app.get('/:shortName/calls', calls.get_calls); */
|
||||
|
||||
|
||||
/*------ UPLOADS ---------- upload.single('call'), uploads.upload,*/
|
||||
@@ -123,13 +123,14 @@ app.get('/:shortName/talkgroups', talkgroups.get_talkgroups);
|
||||
/*------ GROUPS ----------*/
|
||||
app.get('/:shortName/groups', groups.get_groups);
|
||||
|
||||
|
||||
/*------ EVENTS ----------*/
|
||||
app.post('/events', events.addNewEvent);
|
||||
/*app.post('/events', events.addNewEvent);
|
||||
app.get('/events', events.getEvents);
|
||||
app.get('/events/:id', events.getEvent);
|
||||
app.get('/events/:id', events.getEvent);*/
|
||||
|
||||
/*------ STATS ----------*/
|
||||
app.get('/:shortName/stats', stats.get_stats);
|
||||
//app.get('/:shortName/stats', stats.get_stats);
|
||||
|
||||
|
||||
function get_clients(req, res) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"get-folder-size": "^4.0.0",
|
||||
"mkdirp": "^2.1.6",
|
||||
"mongodb": "5.2.0",
|
||||
"mongoose": "7.0.0",
|
||||
"mongoose": "7.0.3",
|
||||
"multer": "1.3.0",
|
||||
"node-ffprobe": "https://github.com/ListenerApproved/node-ffprobe",
|
||||
"node-schedule": "2.1.1",
|
||||
|
||||
Reference in New Issue
Block a user