diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-05-10 12:10:27 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-05-10 12:19:53 +0100 |
commit | 645cb4bf06deee1c4c10ecc3d7df2c914168f19a (patch) | |
tree | d7c6f45ee742673f80fd88af9e7eb5a4e6b46ec1 /synapse/rest/key/v2 | |
parent | Factor wrap_request_handler_with_logging out of wrap_request_handler (diff) | |
download | synapse-645cb4bf06deee1c4c10ecc3d7df2c914168f19a.tar.xz |
Remove redundant request_handler decorator
This is needless complexity; we might as well use the wrapper directly. Also rename wrap_request_handler->wrap_json_request_handler.
Diffstat (limited to 'synapse/rest/key/v2')
-rw-r--r-- | synapse/rest/key/v2/remote_key_resource.py | 8 |
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) |