Skip to content

Commit

Permalink
Merge pull request #1767 from ever-co/fix/github-integration-delete-api
Browse files Browse the repository at this point in the history
fix: Updated Delete Github integration API
  • Loading branch information
evereq authored Nov 11, 2023
2 parents 3515fda + 755c117 commit 34be229
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<IIntegrationTenant>({
path: `/integration-tenant/${integrationId}`,
path: `/integration-tenant/${integrationId}?organizationId=${organizationId}&tenantId=${tenantId}`,
method: 'DELETE',
bearer_token,
tenantId
Expand Down
4 changes: 2 additions & 2 deletions apps/web/pages/api/integration-tenant/[id].ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 34be229

Please sign in to comment.