diff options
author | Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> | 2021-06-07 16:12:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 15:12:34 +0100 |
commit | d558292548178dde785462bbca7f84c06c1e9eda (patch) | |
tree | 77f5c08fa6b99e2c05b2526a2dbaa65ffa5407cb /synapse/rest/admin/media.py | |
parent | Delete completes to-device messages earlier in /sync (#10124) (diff) | |
download | synapse-d558292548178dde785462bbca7f84c06c1e9eda.tar.xz |
Add missing type hints to the admin API servlets (#10105)
Diffstat (limited to 'synapse/rest/admin/media.py')
-rw-r--r-- | synapse/rest/admin/media.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/rest/admin/media.py b/synapse/rest/admin/media.py index b68db2c57c..0a19a333d7 100644 --- a/synapse/rest/admin/media.py +++ b/synapse/rest/admin/media.py @@ -17,6 +17,7 @@ import logging from typing import TYPE_CHECKING, Tuple from synapse.api.errors import AuthError, Codes, NotFoundError, SynapseError +from synapse.http.server import HttpServer from synapse.http.servlet import RestServlet, parse_boolean, parse_integer from synapse.http.site import SynapseRequest from synapse.rest.admin._base import ( @@ -37,12 +38,11 @@ class QuarantineMediaInRoom(RestServlet): this server. """ - PATTERNS = ( - admin_patterns("/room/(?P<room_id>[^/]+)/media/quarantine") - + + PATTERNS = [ + *admin_patterns("/room/(?P<room_id>[^/]+)/media/quarantine"), # This path kept around for legacy reasons - admin_patterns("/quarantine_media/(?P<room_id>[^/]+)") - ) + *admin_patterns("/quarantine_media/(?P<room_id>[^/]+)"), + ] def __init__(self, hs: "HomeServer"): self.store = hs.get_datastore() @@ -312,7 +312,7 @@ class DeleteMediaByDateSize(RestServlet): return 200, {"deleted_media": deleted_media, "total": total} -def register_servlets_for_media_repo(hs: "HomeServer", http_server): +def register_servlets_for_media_repo(hs: "HomeServer", http_server: HttpServer) -> None: """ Media repo specific APIs. """ |