refactor(api): deprecated groups update socket in favour of API lib

This commit is contained in:
Julian Lam
2020-12-21 22:05:00 -05:00
parent e640a41a78
commit 1cd2689cf6
8 changed files with 54 additions and 34 deletions

View File

@@ -15,6 +15,14 @@ Groups.create = async (req, res) => {
helpers.formatApiResponse(200, res, groupObj);
};
Groups.update = async (req, res) => {
const groupObj = await api.groups.update(req, {
...req.body,
slug: req.params.slug,
});
helpers.formatApiResponse(200, res, groupObj);
};
Groups.delete = async (req, res) => {
await api.groups.delete(req, req.params);
helpers.formatApiResponse(200, res);