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

};
