From 755c117e865ee694538fe8d8e85dc49b1fa7a658 Mon Sep 17 00:00:00 2001 From: Badal Khatri Date: Sat, 11 Nov 2023 15:23:53 +0530 Subject: [PATCH] fix: Updated Delete Github integration API --- .../server/requests/integrations/integration-tenant.ts | 9 +++++++-- apps/web/pages/api/integration-tenant/[id].ts | 4 ++-- apps/web/public/locales/en/common.json | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/web/app/services/server/requests/integrations/integration-tenant.ts b/apps/web/app/services/server/requests/integrations/integration-tenant.ts index 8f612b43f..446e78651 100644 --- a/apps/web/app/services/server/requests/integrations/integration-tenant.ts +++ b/apps/web/app/services/server/requests/integrations/integration-tenant.ts @@ -25,9 +25,14 @@ export function getIntegrationTenantRequest( }); } -export function deleteIntegrationTenantRequest(integrationId: string, tenantId: string, bearer_token: string) { +export function deleteIntegrationTenantRequest( + integrationId: string, + tenantId: string, + organizationId: string, + bearer_token: string +) { return serverFetch({ - path: `/integration-tenant/${integrationId}`, + path: `/integration-tenant/${integrationId}?organizationId=${organizationId}&tenantId=${tenantId}`, method: 'DELETE', bearer_token, tenantId diff --git a/apps/web/pages/api/integration-tenant/[id].ts b/apps/web/pages/api/integration-tenant/[id].ts index 22f03b679..01ea6e4a3 100644 --- a/apps/web/pages/api/integration-tenant/[id].ts +++ b/apps/web/pages/api/integration-tenant/[id].ts @@ -3,7 +3,7 @@ import { deleteIntegrationTenantRequest } from '@app/services/server/requests'; import { NextApiRequest, NextApiResponse } from 'next'; export default async function handler(req: NextApiRequest, res: NextApiResponse) { - const { $res, user, access_token, tenantId } = await authenticatedGuard(req, res); + const { $res, user, access_token, tenantId, organizationId } = await authenticatedGuard(req, res); if (!user) return $res(); const { id } = req.query; @@ -13,7 +13,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) } if (id) { - const response = await deleteIntegrationTenantRequest(id as string, tenantId, access_token); + const response = await deleteIntegrationTenantRequest(id as string, tenantId, organizationId, access_token); return $res.status(200).json(response); } diff --git a/apps/web/public/locales/en/common.json b/apps/web/public/locales/en/common.json index 3ec33feb3..43e88ae26 100644 --- a/apps/web/public/locales/en/common.json +++ b/apps/web/public/locales/en/common.json @@ -168,7 +168,7 @@ "KEYBOARD_SHORTCUTS": "Keyboard Shortcuts", "GITHUB_LOADING_TEXT": "We are now installing your GitHub Integration, hold on...", - "GITHUB_INTEGRATION_SUBTITLE_TEXT": "Activate GitHub integration for project & repository sync", + "GITHUB_INTEGRATION_SUBTITLE_TEXT": "Activate GitHub Integration for project & repository sync", "GITHUB_INTEGRATION_AUTO_SYNC_TASK_TEXT": "Automatically synchronize tasks in your application for seamless and efficient updates.", "GITHUB_INTEGRATION_LABEL_SYNC_TASK_TEXT": "Synchronize tasks selectively by associating them with specific label.", "GITHUB_AUTO_SYNC_LABEL": "Select Auto-Sync Label"