@@ -335,7 +335,7 @@ module.exports = (crowi) => {
try {
const userGroup = await crowi.userGroupService.updateGroup(id, name, description, parentId, forceUpdateParents);
- res.apiv3({ userGroup });
+ return res.apiv3({ userGroup });
}
catch (err) {
const msg = 'Error occurred in updating a user group name';
@@ -55,7 +55,7 @@ class UserGroupService {
const parent = await UserGroup.findById(parentId);
if (parent == null) { // it should not be null
- throw Error('parent does not exist.');
+ throw Error('Parent group does not exist.');