From 93db60fce72ba928b7e8acdfe6ca7ff0ff26c8b2 Mon Sep 17 00:00:00 2001 From: wdbasson Date: Fri, 2 Feb 2024 17:03:17 +0200 Subject: [PATCH] Grouped routes for webhooks (#638) * Grouped routes for webhooks * Trigger deploy --- .github/workflows/continuous-deploy.yml | 2 +- app/main.py | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/continuous-deploy.yml b/.github/workflows/continuous-deploy.yml index 5f6f4badf..da1d32445 100644 --- a/.github/workflows/continuous-deploy.yml +++ b/.github/workflows/continuous-deploy.yml @@ -357,7 +357,7 @@ jobs: repository: didx-xyz/charts token: ${{ secrets.PAT }} path: charts - # ref: ${{ steps.set_branch.outputs.result }} # + # ref: ${{ steps.set_branch.outputs.result }} - name: Install dependencies run: sudo apt-get install -y postgresql-client redis-tools diff --git a/app/main.py b/app/main.py index 8451c44b6..44267c10b 100644 --- a/app/main.py +++ b/app/main.py @@ -25,6 +25,7 @@ trust_registry, verifier, webhooks, + websocket_endpoint, ) from app.routes.admin import tenants from app.routes.wallet import credentials as wallet_credentials @@ -74,11 +75,10 @@ async def lifespan(_: FastAPI): await WebsocketManager.disconnect_all() +webhook_routes = [webhooks, sse, websocket_endpoint] + trust_registry_routes = [trust_registry] -tenant_admin_routes = [ - tenants, - sse, -] +tenant_admin_routes = [tenants] + webhook_routes tenant_routes = [ connections, definitions, @@ -89,9 +89,7 @@ async def lifespan(_: FastAPI): verifier, wallet_credentials, wallet_dids, - webhooks, - sse, -] +] + webhook_routes def routes_for_role(role: str) -> list: