api: Add an endpoint for listing the user groups in realm.

Adds endpoint for listing the user groups in realm.
Provides "description", "members", "name" and "id" for each user group.

Fixes #10298
This commit is contained in:
Roman Godov
2018-08-16 03:44:51 +03:00
committed by Tim Abbott
parent 1efcdfdb5c
commit a2f407c11b
3 changed files with 18 additions and 1 deletions

View File

@@ -251,6 +251,8 @@ v1_api_and_json_patterns = [
'DELETE': 'zerver.views.push_notifications.remove_android_reg_id'}),
# user_groups -> zerver.views.user_groups
url(r'^user_groups$', rest_dispatch,
{'GET': 'zerver.views.user_groups.get_user_group'}),
url(r'^user_groups/create$', rest_dispatch,
{'POST': 'zerver.views.user_groups.add_user_group'}),
url(r'^user_groups/(?P<user_group_id>\d+)$', rest_dispatch,