This commit is contained in:
Untone 2024-12-16 20:03:00 +03:00
parent f73f3608c0
commit c4ffc08bae

View File

@ -28,7 +28,7 @@ async def check_webhook_existence():
headers = { headers = {
"Content-Type": "application/json", "Content-Type": "application/json",
"x-authorizer-admin-secret": ADMIN_SECRET, "x-authorizer-admin-secret": ADMIN_SECRET
} }
operation = "GetWebhooks" operation = "GetWebhooks"
@ -47,6 +47,7 @@ async def check_webhook_existence():
if result: if result:
logger.info(result) logger.info(result)
webhooks = result.get("data", {}).get(query_name, {}).get("webhooks", []) webhooks = result.get("data", {}).get(query_name, {}).get("webhooks", [])
logger.info(webhooks)
for webhook in webhooks: for webhook in webhooks:
if webhook["event_name"].startswith("user.login"): if webhook["event_name"].startswith("user.login"):
return True, webhook["id"], webhook["endpoint"] return True, webhook["id"], webhook["endpoint"]