From 5453900caacf75472443755c930bf2973ebee5c7 Mon Sep 17 00:00:00 2001 From: Hassan_Wari <85742599+hassan254-prog@users.noreply.github.com> Date: Fri, 13 Sep 2024 12:56:01 +0300 Subject: [PATCH] fix(hooks): update jira hook (#2720) ## Describe your changes - Update Jira hook with baseUrl --- packages/server/lib/hooks/connection/jira-post-connection.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/server/lib/hooks/connection/jira-post-connection.ts b/packages/server/lib/hooks/connection/jira-post-connection.ts index 453478d810a..dcc48ba8d17 100644 --- a/packages/server/lib/hooks/connection/jira-post-connection.ts +++ b/packages/server/lib/hooks/connection/jira-post-connection.ts @@ -14,6 +14,7 @@ export default async function execute(nango: Nango) { } const cloudId = response.data[0].id; + const baseUrl = response.data[0].url; const accountResponse = await nango.proxy({ endpoint: `ex/jira/${cloudId}/rest/api/3/myself`, @@ -22,11 +23,11 @@ export default async function execute(nango: Nango) { }); if (axios.isAxiosError(accountResponse) || !accountResponse || !accountResponse.data || accountResponse.data.length === 0) { - await nango.updateConnectionConfig({ cloudId }); + await nango.updateConnectionConfig({ cloudId, baseUrl }); return; } const { accountId } = accountResponse.data; - await nango.updateConnectionConfig({ cloudId, accountId }); + await nango.updateConnectionConfig({ cloudId, baseUrl, accountId }); }