diff --git a/src/controllers/group.js b/src/controllers/group.js index 373b500..b5a0e17 100644 --- a/src/controllers/group.js +++ b/src/controllers/group.js @@ -13,12 +13,13 @@ class GroupController { let { groupName } = req.params; let user = jwt.decode(req.headers.authorization.split(' ')[1], config.secret); - let status = await GroupService.create(groupName, user.login.id); + let group = await GroupService.create(groupName, user.login.id); log.info(`New group with name ${groupName} was just created by user ${user.login.username}`); await UserService.joinGroup(user.login.id, status.id); - return res.status(200).send(translate(req.headers["accept-language"], responseCodes.responses.general.ok)); + // return res.status(200).send(translate(req.headers["accept-language"], responseCodes.responses.general.ok)); + return res.status(200).send(group.id.toString()) } async join(req, res) { let { groupId } = req.params;