summary refs log tree commit diff
path: root/synapse/rest/key
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-05-10 15:26:53 +0100
committerGitHub <noreply@github.com>2018-05-10 15:26:53 +0100
commit7b411007e6558d5be835257e52a7479a375b027c (patch)
treed7c6f45ee742673f80fd88af9e7eb5a4e6b46ec1 /synapse/rest/key
parentMerge pull request #3199 from matrix-org/erikj/pagination_sync (diff)
parentRemove redundant request_handler decorator (diff)
downloadsynapse-7b411007e6558d5be835257e52a7479a375b027c.tar.xz
Merge pull request #3203 from matrix-org/rav/refactor_request_handler
Refactor request handling wrappers
Diffstat (limited to 'synapse/rest/key')
-rw-r--r--synapse/rest/key/v2/remote_key_resource.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/rest/key/v2/remote_key_resource.py b/synapse/rest/key/v2/remote_key_resource.py
index 17e6079cba..17b3077926 100644
--- a/synapse/rest/key/v2/remote_key_resource.py
+++ b/synapse/rest/key/v2/remote_key_resource.py
@@ -12,7 +12,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from synapse.http.server import request_handler, respond_with_json_bytes
+from synapse.http.server import (
+    respond_with_json_bytes, wrap_json_request_handler,
+)
 from synapse.http.servlet import parse_integer, parse_json_object_from_request
 from synapse.api.errors import SynapseError, Codes
 from synapse.crypto.keyring import KeyLookupError
@@ -99,7 +101,7 @@ class RemoteKey(Resource):
         self.async_render_GET(request)
         return NOT_DONE_YET
 
-    @request_handler()
+    @wrap_json_request_handler
     @defer.inlineCallbacks
     def async_render_GET(self, request):
         if len(request.postpath) == 1:
@@ -124,7 +126,7 @@ class RemoteKey(Resource):
         self.async_render_POST(request)
         return NOT_DONE_YET
 
-    @request_handler()
+    @wrap_json_request_handler
     @defer.inlineCallbacks
     def async_render_POST(self, request):
         content = parse_json_object_from_request(request)