From 203eec25049d629236cf2d501657b3ead043c007 Mon Sep 17 00:00:00 2001 From: talsabagport Date: Thu, 31 Oct 2024 13:38:34 +0200 Subject: [PATCH] try registering route in different place --- integrations/jira/main.py | 5 ----- integrations/jira/pyproject.toml | 2 +- port_ocean/ocean.py | 4 ++++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/integrations/jira/main.py b/integrations/jira/main.py index 9fc5b9b46b..22918e7043 100644 --- a/integrations/jira/main.py +++ b/integrations/jira/main.py @@ -59,11 +59,6 @@ async def on_resync_issues(kind: str) -> ASYNC_GENERATOR_RESYNC_TYPE: yield issues -@ocean.router.post("/webhook") -async def handle_webhook_request(data: dict[str, Any]) -> dict[str, Any]: - return {"ok": True} - - # Called once when the integration starts. @ocean.on_start() async def on_start() -> None: diff --git a/integrations/jira/pyproject.toml b/integrations/jira/pyproject.toml index 7a03319105..1327b6c00c 100644 --- a/integrations/jira/pyproject.toml +++ b/integrations/jira/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jira" -version = "0.1.89-dev049" +version = "0.1.89-dev050" description = "Integration to bring information from Jira into Port" authors = ["Mor Paz "] diff --git a/port_ocean/ocean.py b/port_ocean/ocean.py index 3e527c1a3a..43ce257eeb 100644 --- a/port_ocean/ocean.py +++ b/port_ocean/ocean.py @@ -53,6 +53,10 @@ def __init__( ) self.integration_router = integration_router or APIRouter() + @self.integration_router.post("/webhook") + async def handle_webhook_request(data: dict[str, Any]) -> dict[str, Any]: + return {"ok": True} + self.port_client = PortClient( base_url=self.config.port.base_url, client_id=self.config.port.client_id,