diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-10-10 12:16:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-10 12:16:36 -0400 |
commit | f1e43018b7d526f3e969796bf882c1848b663449 (patch) | |
tree | a2a33ea2910094f5dc88eef6f7efea1214ce573e /synapse/rest/admin/users.py | |
parent | Merge remote-tracking branch 'origin/master' into develop (diff) | |
download | synapse-f1e43018b7d526f3e969796bf882c1848b663449.tar.xz |
Inline simple_search_list/simple_search_list_txn. (#16434)
This only has a single use and is over abstracted. Inline it so that we can improve type hints.
Diffstat (limited to 'synapse/rest/admin/users.py')
-rw-r--r-- | synapse/rest/admin/users.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py index 5b743a1d03..cd995e8dbb 100644 --- a/synapse/rest/admin/users.py +++ b/synapse/rest/admin/users.py @@ -842,7 +842,18 @@ class SearchUsersRestServlet(RestServlet): logger.info("term: %s ", term) ret = await self.store.search_users(term) - return HTTPStatus.OK, ret + results = [ + { + "name": name, + "password_hash": password_hash, + "is_guest": bool(is_guest), + "admin": bool(admin), + "user_type": user_type, + } + for name, password_hash, is_guest, admin, user_type in ret + ] + + return HTTPStatus.OK, results class UserAdminServlet(RestServlet): |