From 981a7558f7c824a5b16e806f2dfbb1974a0dc3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 23 Jun 2015 14:08:04 -0400 Subject: [PATCH] use group name, hidden groups are not in groupslug:groupname --- src/controllers/admin/groups.js | 2 +- src/routes/admin.js | 2 +- src/views/admin/manage/groups.tpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/admin/groups.js b/src/controllers/admin/groups.js index e30bf150c3..05c7294fdc 100644 --- a/src/controllers/admin/groups.js +++ b/src/controllers/admin/groups.js @@ -27,7 +27,7 @@ groupsController.list = function(req, res, next) { }; groupsController.get = function(req, res, next) { - var groupName = res.locals.groupName; + var groupName = req.params.name; async.waterfall([ function(next){ groups.exists(groupName, next); diff --git a/src/routes/admin.js b/src/routes/admin.js index d60d547d29..91090c2b69 100644 --- a/src/routes/admin.js +++ b/src/routes/admin.js @@ -60,7 +60,7 @@ function addRoutes(router, middleware, controllers) { router.get('/manage/users/banned', controllers.admin.users.banned); router.get('/manage/groups', controllers.admin.groups.list); - router.get('/manage/groups/:slug', middleware.exposeGroupName, controllers.admin.groups.get); + router.get('/manage/groups/:name', controllers.admin.groups.get); router.get('/settings/:term?', controllers.admin.settings.get); diff --git a/src/views/admin/manage/groups.tpl b/src/views/admin/manage/groups.tpl index 026afaddba..daa492b5f8 100644 --- a/src/views/admin/manage/groups.tpl +++ b/src/views/admin/manage/groups.tpl @@ -18,7 +18,7 @@
- Edit + Edit