Add additional log lines when configuring the Notion settings for a user in the callback

This commit is contained in:
sabaimran 2024-04-05 13:19:24 +05:30
parent d23f7da8e3
commit 00a67e9524

View file

@ -69,8 +69,12 @@ async def notion_auth_callback(request: Request, background_tasks: BackgroundTas
final_response = response.json() final_response = response.json()
logger.info(f"Notion auth callback response: {final_response}")
access_token = final_response.get("access_token") access_token = final_response.get("access_token")
NotionConfig.objects.acreate(token=access_token, user=user) notion_config = NotionConfig.objects.acreate(token=access_token, user=user)
logger.info(f"Notion config created: {notion_config}")
owner = final_response.get("owner") owner = final_response.get("owner")
workspace_id = final_response.get("workspace_id") workspace_id = final_response.get("workspace_id")