name => username

This commit is contained in:
Emmanuel Garette 2019-11-28 14:58:38 +01:00
parent 37499daccf
commit 1c7a8b7417
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ from .error import CallError, NotAllowedError
async def handle(request): async def handle(request):
version, uri = request.match_info.get_info()['path'].split('/', 2)[-2:] version, uri = request.match_info.get_info()['path'].split('/', 2)[-2:]
context = Context() context = Context()
context.username = request.match_info.get('name', "Anonymous") context.username = request.match_info.get('username', "Anonymous")
try: try:
text = await dispatcher.call(version, uri, context, id=2, public_only=True) text = await dispatcher.call(version, uri, context, id=2, public_only=True)
except NotAllowedError as err: except NotAllowedError as err: