feat(chalice): fixed update slack integration

This commit is contained in:
Taha Yassine Kraiem 2023-01-24 19:29:44 +01:00
parent ca9d6bc775
commit 5c142a8a68

View file

@ -79,7 +79,7 @@ def add_slack_client(data: schemas.AddCollaborationSchema, context: schemas.Curr
def edit_slack_integration(integrationId: int, data: schemas.EditCollaborationSchema = Body(...),
context: schemas.CurrentContext = Depends(OR_context)):
if len(data.url) > 0:
old = webhook.get(tenant_id=context.tenant_id, webhook_id=integrationId)
old = webhook.get_webhook(tenant_id=context.tenant_id, webhook_id=integrationId)
if old["endpoint"] != data.url:
if not Slack.say_hello(data.url):
return {