Skip to content

Commit 00a2644

Browse files
authored
Add app to request dict for subscriptions
1 parent 8cef768 commit 00a2644

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

aidbox_python_sdk/handlers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ async def subscription(request, data):
1717
if not handler:
1818
logger.error("Subscription handler `{}` was not found".format(data["handler"]))
1919
raise web.HTTPNotFound()
20-
result = handler(data["event"], request)
20+
data["request"]["app"] = request.app
21+
result = handler(data["event"], data["request"])
2122
if asyncio.iscoroutine(result):
2223
asyncio.get_event_loop().create_task(result)
2324
return web.json_response({})

0 commit comments

Comments
 (0)