diff --git a/src/controllers/admin/groups.js b/src/controllers/admin/groups.js index e4da58a650..1a7dc950c7 100644 --- a/src/controllers/admin/groups.js +++ b/src/controllers/admin/groups.js @@ -9,6 +9,7 @@ const groups = require('../../groups'); const meta = require('../../meta'); const pagination = require('../../pagination'); const events = require('../../events'); +const slugify = require('../../slugify'); const groupsController = module.exports; @@ -31,7 +32,8 @@ groupsController.list = async function (req, res) { }; groupsController.get = async function (req, res, next) { - const groupName = req.params.name; + const slug = slugify(req.params.name); + const groupName = await groups.getGroupNameByGroupSlug(slug); const [groupNames, group] = await Promise.all([ getGroupNames(), groups.get(groupName, { uid: req.uid, truncateUserList: true, userListCount: 20 }), diff --git a/src/views/admin/manage/groups.tpl b/src/views/admin/manage/groups.tpl index 03a38ec656..25f7b835b5 100644 --- a/src/views/admin/manage/groups.tpl +++ b/src/views/admin/manage/groups.tpl @@ -21,7 +21,7 @@
{groups.description}