fewer routes

This commit is contained in:
Luke Berndt
2023-04-11 20:51:39 -04:00
parent dc1b190b5f
commit 3b7aab32fd
3 changed files with 7 additions and 8 deletions

View File

@@ -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));
});
}