summary refs log tree commit diff
path: root/synapse/rest/admin/registration_tokens.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2023-10-31 13:13:28 -0400
committerGitHub <noreply@github.com>2023-10-31 13:13:28 -0400
commitcfb6d38c47711b8dfaf0125353aec88d16708b97 (patch)
tree5376fba887e841c9574b5ee444719560e5c47135 /synapse/rest/admin/registration_tokens.py
parentMerge branch 'release-v1.96' into develop (diff)
downloadsynapse-cfb6d38c47711b8dfaf0125353aec88d16708b97.tar.xz
Remove remaining usage of cursor_to_dict. (#16564)
Diffstat (limited to 'synapse/rest/admin/registration_tokens.py')
-rw-r--r--synapse/rest/admin/registration_tokens.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/synapse/rest/admin/registration_tokens.py b/synapse/rest/admin/registration_tokens.py
index ffce92d45e..f3e06d3da3 100644
--- a/synapse/rest/admin/registration_tokens.py
+++ b/synapse/rest/admin/registration_tokens.py
@@ -77,7 +77,18 @@ class ListRegistrationTokensRestServlet(RestServlet):
         await assert_requester_is_admin(self.auth, request)
         valid = parse_boolean(request, "valid")
         token_list = await self.store.get_registration_tokens(valid)
-        return HTTPStatus.OK, {"registration_tokens": token_list}
+        return HTTPStatus.OK, {
+            "registration_tokens": [
+                {
+                    "token": t[0],
+                    "uses_allowed": t[1],
+                    "pending": t[2],
+                    "completed": t[3],
+                    "expiry_time": t[4],
+                }
+                for t in token_list
+            ]
+        }
 
 
 class NewRegistrationTokenRestServlet(RestServlet):