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/consent/consent_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/consent/consent_resource.py')
-rw-r--r-- | synapse/rest/consent/consent_resource.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/synapse/rest/consent/consent_resource.py b/synapse/rest/consent/consent_resource.py index 0a890c98cb..4386eb4e72 100644 --- a/synapse/rest/consent/consent_resource.py +++ b/synapse/rest/consent/consent_resource.py @@ -26,11 +26,7 @@ from twisted.internet import defer from synapse.api.errors import NotFoundError, StoreError, SynapseError from synapse.config import ConfigError -from synapse.http.server import ( - DirectServeResource, - respond_with_html, - wrap_html_request_handler, -) +from synapse.http.server import DirectServeHtmlResource, respond_with_html from synapse.http.servlet import parse_string from synapse.types import UserID @@ -48,7 +44,7 @@ else: return a == b -class ConsentResource(DirectServeResource): +class ConsentResource(DirectServeHtmlResource): """A twisted Resource to display a privacy policy and gather consent to it When accessed via GET, returns the privacy policy via a template. @@ -119,7 +115,6 @@ class ConsentResource(DirectServeResource): self._hmac_secret = hs.config.form_secret.encode("utf-8") - @wrap_html_request_handler async def _async_render_GET(self, request): """ Args: @@ -160,7 +155,6 @@ class ConsentResource(DirectServeResource): except TemplateNotFound: raise NotFoundError("Unknown policy version") - @wrap_html_request_handler async def _async_render_POST(self, request): """ Args: |