mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 10:04:56 -04:00
Fix additional type hints from Twisted 21.2.0. (#9591)
This commit is contained in:
parent
1e67bff833
commit
55da8df078
18 changed files with 187 additions and 119 deletions
|
@ -20,6 +20,7 @@ from typing import TYPE_CHECKING
|
|||
from twisted.web.server import Request
|
||||
|
||||
from synapse.http.server import DirectServeJsonResource, respond_with_json
|
||||
from synapse.http.site import SynapseRequest
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from synapse.app.homeserver import HomeServer
|
||||
|
@ -35,7 +36,7 @@ class MediaConfigResource(DirectServeJsonResource):
|
|||
self.auth = hs.get_auth()
|
||||
self.limits_dict = {"m.upload.size": config.max_upload_size}
|
||||
|
||||
async def _async_render_GET(self, request: Request) -> None:
|
||||
async def _async_render_GET(self, request: SynapseRequest) -> None:
|
||||
await self.auth.get_user_by_req(request)
|
||||
respond_with_json(request, 200, self.limits_dict, send_cors=True)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue