mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-03-14 18:26:41 -04:00
daemon: Add some documentation to the daemon methods.
This commit is contained in:
parent
1c45fabe9f
commit
3fa6ce9292
@ -54,6 +54,15 @@ class ProxyDaemon:
|
||||
return access_token
|
||||
|
||||
async def forward_request(self, request, session):
|
||||
# type: (aiohttp.BaseRequest, aiohttp.ClientSession) -> str
|
||||
"""Forward the given request to our configured homeserver.
|
||||
|
||||
Args:
|
||||
request (aiohttp.BaseRequest): The request that should be
|
||||
forwarded.
|
||||
session (aiohttp.ClientSession): The client session that should be
|
||||
used to forward the request.
|
||||
"""
|
||||
path = request.path
|
||||
method = request.method
|
||||
data = await request.text()
|
||||
@ -74,6 +83,7 @@ class ProxyDaemon:
|
||||
)
|
||||
|
||||
async def router(self, request):
|
||||
"""Catchall request router."""
|
||||
session = None
|
||||
|
||||
token = self.get_access_token(request)
|
||||
|
Loading…
x
Reference in New Issue
Block a user