diff options
author | Erik Johnston <erik@matrix.org> | 2020-07-03 19:02:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-03 19:02:19 +0100 |
commit | 5cdca53aa07f921029cb8027693095d150c37e32 (patch) | |
tree | d272c8d95776493ab7d4020a555293a510b2104e /synapse/rest/media/v1/thumbnail_resource.py | |
parent | Fix inconsistent handling of upper and lower cases of email addresses. (#7021) (diff) | |
download | synapse-5cdca53aa07f921029cb8027693095d150c37e32.tar.xz |
Merge different Resource implementation classes (#7732)
Diffstat (limited to 'synapse/rest/media/v1/thumbnail_resource.py')
-rw-r--r-- | synapse/rest/media/v1/thumbnail_resource.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/synapse/rest/media/v1/thumbnail_resource.py b/synapse/rest/media/v1/thumbnail_resource.py index 0b87220234..a83535b97b 100644 --- a/synapse/rest/media/v1/thumbnail_resource.py +++ b/synapse/rest/media/v1/thumbnail_resource.py @@ -16,11 +16,7 @@ import logging -from synapse.http.server import ( - DirectServeResource, - set_cors_headers, - wrap_json_request_handler, -) +from synapse.http.server import DirectServeJsonResource, set_cors_headers from synapse.http.servlet import parse_integer, parse_string from ._base import ( @@ -34,7 +30,7 @@ from ._base import ( logger = logging.getLogger(__name__) -class ThumbnailResource(DirectServeResource): +class ThumbnailResource(DirectServeJsonResource): isLeaf = True def __init__(self, hs, media_repo, media_storage): @@ -45,9 +41,7 @@ class ThumbnailResource(DirectServeResource): self.media_storage = media_storage self.dynamic_thumbnails = hs.config.dynamic_thumbnails self.server_name = hs.hostname - self.clock = hs.get_clock() - @wrap_json_request_handler async def _async_render_GET(self, request): set_cors_headers(request) server_name, media_id, _ = parse_media_id(request) |