mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 02:25:55 +01:00
refactor(api): deprecated groups update socket in favour of API lib
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user