daemon: Add some documentation to the daemon methods.

This commit is contained in:
Damir Jelić 2019-04-03 17:05:04 +02:00
parent 1c45fabe9f
commit 3fa6ce9292

View File

@ -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)