summary refs log tree commit diff
path: root/synapse/rest/client/v1/admin.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-07-24 10:42:28 +0100
committerGitHub <noreply@github.com>2018-07-24 10:42:28 +0100
commitd436ad332c78cf0ad306f95c3f36f83190d2b133 (patch)
tree6ca24a89a40ea34be26412eb60cdd69f0f0caede /synapse/rest/client/v1/admin.py
parentMerge pull request #3590 from matrix-org/rav/persist_events_metrics (diff)
parentMerge branch 'develop' into erikj/client_apis_move (diff)
downloadsynapse-d436ad332c78cf0ad306f95c3f36f83190d2b133.tar.xz
Merge pull request #3555 from matrix-org/erikj/client_apis_move
Make client_reader support some more read only APIs
Diffstat (limited to 'synapse/rest/client/v1/admin.py')
-rw-r--r--synapse/rest/client/v1/admin.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/rest/client/v1/admin.py b/synapse/rest/client/v1/admin.py
index 9e9c175970..99f6c6e3c3 100644
--- a/synapse/rest/client/v1/admin.py
+++ b/synapse/rest/client/v1/admin.py
@@ -244,7 +244,7 @@ class PurgeHistoryRestServlet(ClientV1RestServlet):
             hs (synapse.server.HomeServer)
         """
         super(PurgeHistoryRestServlet, self).__init__(hs)
-        self.handlers = hs.get_handlers()
+        self.pagination_handler = hs.get_pagination_handler()
         self.store = hs.get_datastore()
 
     @defer.inlineCallbacks
@@ -319,7 +319,7 @@ class PurgeHistoryRestServlet(ClientV1RestServlet):
                 errcode=Codes.BAD_JSON,
             )
 
-        purge_id = yield self.handlers.message_handler.start_purge_history(
+        purge_id = yield self.pagination_handler.start_purge_history(
             room_id, token,
             delete_local_events=delete_local_events,
         )
@@ -341,7 +341,7 @@ class PurgeHistoryStatusRestServlet(ClientV1RestServlet):
             hs (synapse.server.HomeServer)
         """
         super(PurgeHistoryStatusRestServlet, self).__init__(hs)
-        self.handlers = hs.get_handlers()
+        self.pagination_handler = hs.get_pagination_handler()
 
     @defer.inlineCallbacks
     def on_GET(self, request, purge_id):
@@ -351,7 +351,7 @@ class PurgeHistoryStatusRestServlet(ClientV1RestServlet):
         if not is_admin:
             raise AuthError(403, "You are not a server admin")
 
-        purge_status = self.handlers.message_handler.get_purge_status(purge_id)
+        purge_status = self.pagination_handler.get_purge_status(purge_id)
         if purge_status is None:
             raise NotFoundError("purge id '%s' not found" % purge_id)