|
|
@@ -429,13 +429,16 @@ module.exports = (crowi) => {
|
|
|
* type: object
|
|
|
* description: A result of `UserGroup.removeCompletelyById`
|
|
|
*/
|
|
|
- router.delete('/:id', loginRequiredStrictly, adminRequired, csrf, validator.delete, apiV3FormValidator, async(req, res) => {
|
|
|
+ router.delete('/:id', loginRequiredStrictly, adminRequired, csrf, validator.delete, apiV3FormValidator, addActivity, async(req, res) => {
|
|
|
const { id: deleteGroupId } = req.params;
|
|
|
const { actionName, transferToUserGroupId } = req.query;
|
|
|
|
|
|
try {
|
|
|
const userGroups = await crowi.userGroupService.removeCompletelyByRootGroupId(deleteGroupId, actionName, transferToUserGroupId, req.user);
|
|
|
|
|
|
+ const parameters = { action: SupportedAction.ACTION_ADMIN_USER_GROUP_DELETE };
|
|
|
+ activityEvent.emit('update', res.locals.activity._id, parameters);
|
|
|
+
|
|
|
return res.apiv3({ userGroups });
|
|
|
}
|
|
|
catch (err) {
|