mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 08:37:07 +00:00
21 lines
438 B
JavaScript
21 lines
438 B
JavaScript
const comparisons = require('../../../../lib/comparisons');
|
|
|
|
|
|
module.exports = async function (req, res, next) {
|
|
|
|
try {
|
|
// const data = await comparisons.groups()
|
|
// if (data?.[req.params.group]) {
|
|
const data = await comparisons.getGroup(req.params.group);
|
|
if (data) {
|
|
res.status(200).send(data);
|
|
} else {
|
|
res.status(404).send({message: "Group does not exist"});
|
|
}
|
|
return next();
|
|
} catch (err) {
|
|
next(err);
|
|
}
|
|
|
|
};
|