Change the put route for setting group members

This commit is contained in:
Girish Ramakrishnan
2016-10-01 17:33:50 -07:00
parent 7779e5da3b
commit 3ae7a514ef
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -862,9 +862,10 @@ Response (200):
### Set members
PUT `/api/v1/groups/:groupId` <scope>admin</scope>
PUT `/api/v1/groups/:groupId/members` <scope>admin</scope>
Sets the members of an existing group with id `groupId`.
Sets the members of an existing group with id `groupId`. Note that this replaces the
existing users with the provided userIds.
Request:
```
+1 -1
View File
@@ -5,7 +5,7 @@ exports = module.exports = {
list: list,
create: create,
remove: remove,
update: update
update: updateMembers
};
var assert = require('assert'),
+1 -1
View File
@@ -123,7 +123,7 @@ function initializeExpressSync() {
router.get ('/api/v1/groups', usersScope, routes.user.requireAdmin, routes.groups.list);
router.post('/api/v1/groups', usersScope, routes.user.requireAdmin, routes.groups.create);
router.get ('/api/v1/groups/:groupId', usersScope, routes.user.requireAdmin, routes.groups.get);
router.put ('/api/v1/groups/:groupId', usersScope, routes.user.requireAdmin, routes.groups.update);
router.put ('/api/v1/groups/:groupId/members', usersScope, routes.user.requireAdmin, routes.groups.updateMembers);
router.del ('/api/v1/groups/:groupId', usersScope, routes.user.requireAdmin, routes.user.verifyPassword, routes.groups.remove);
// form based login routes used by oauth2 frame