diff options
author | Manuel Stahl <37705355+awesome-manuel@users.noreply.github.com> | 2019-12-05 19:12:23 +0100 |
---|---|---|
committer | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-12-05 18:12:23 +0000 |
commit | 649b6bc0888bb1f8c408d72dd92b0c025535a866 (patch) | |
tree | 859f096cee0146b9b7c8446a314a1f6f5b4c36dd /synapse/handlers | |
parent | Merge pull request #6483 from matrix-org/erikj/port_rest_v2 (diff) | |
download | synapse-649b6bc0888bb1f8c408d72dd92b0c025535a866.tar.xz |
Replace /admin/v1/users_paginate endpoint with /admin/v2/users (#5925)
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/admin.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/synapse/handlers/admin.py b/synapse/handlers/admin.py index 6407d56f8e..14449b9a1e 100644 --- a/synapse/handlers/admin.py +++ b/synapse/handlers/admin.py @@ -56,7 +56,7 @@ class AdminHandler(BaseHandler): @defer.inlineCallbacks def get_users(self): - """Function to reterive a list of users in users table. + """Function to retrieve a list of users in users table. Args: Returns: @@ -67,19 +67,22 @@ class AdminHandler(BaseHandler): return ret @defer.inlineCallbacks - def get_users_paginate(self, order, start, limit): - """Function to reterive a paginated list of users from - users list. This will return a json object, which contains - list of users and the total number of users in users table. + def get_users_paginate(self, start, limit, name, guests, deactivated): + """Function to retrieve a paginated list of users from + users list. This will return a json list of users. Args: - order (str): column name to order the select by this column start (int): start number to begin the query from - limit (int): number of rows to reterive + limit (int): number of rows to retrieve + name (string): filter for user names + guests (bool): whether to in include guest users + deactivated (bool): whether to include deactivated users Returns: - defer.Deferred: resolves to json object {list[dict[str, Any]], count} + defer.Deferred: resolves to json list[dict[str, Any]] """ - ret = yield self.store.get_users_paginate(order, start, limit) + ret = yield self.store.get_users_paginate( + start, limit, name, guests, deactivated + ) return ret |