Skip to content

Commit 34554cf

Browse files
committed
chore: unused code removed
1 parent 9db17b8 commit 34554cf

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

src/components/ciPipeline/Webhook/WebhookDetailsModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import { MODES, SERVER_MODE, WEBHOOK_NO_API_TOKEN_ERROR } from '../../../config'
5252
import { createGeneratedAPIToken } from '@Pages/GlobalConfigurations/Authorization/APITokens/service'
5353
import { CURL_PREFIX, GENERATE_TOKEN_WITH_REQUIRED_PERMISSIONS, PLAYGROUND_TAB_LIST, REQUEST_BODY_TAB_LIST, RESPONSE_TAB_LIST } from './webhook.utils'
5454
import { SchemaType, TabDetailsType, WebhookDetailsType, WebhookDetailType } from './types'
55-
import { executeWebhookAPI, getExternalCIConfig, getWebhookAPITokenList } from './webhook.service'
55+
import { executeWebhookAPI, getExternalCIConfig } from './webhook.service'
5656
import { GENERATE_TOKEN_NAME_VALIDATION } from '../../../config/constantMessaging'
5757
import { createUserPermissionPayload } from '@Pages/GlobalConfigurations/Authorization/utils'
5858
import { ChartGroupPermissionsFilter } from '@Pages/GlobalConfigurations/Authorization/types'

src/components/ciPipeline/Webhook/webhook.service.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ import {
1818
AppConfigProps,
1919
get,
2020
GetTemplateAPIRouteType,
21-
ResponseType,
2221
getTemplateAPIRoute,
2322
} from '@devtron-labs/devtron-fe-common-lib'
2423
import { Routes } from '../../../config'
25-
import { WebhookDetailsResponse, WebhookDetailsType, WebhookListResponse } from './types'
24+
import { WebhookDetailsResponse, WebhookListResponse } from './types'
2625

2726
export function getExternalCIList(appId: number | string, isTemplateView: AppConfigProps['isTemplateView']): Promise<WebhookListResponse> {
2827
const url = isTemplateView ? getTemplateAPIRoute({
@@ -53,16 +52,6 @@ export function getExternalCIConfig(
5352
return get(url)
5453
}
5554

56-
export function getWebhookAPITokenList(
57-
projectName: string,
58-
environmentName: string,
59-
appName: string,
60-
): Promise<ResponseType> {
61-
return get(
62-
`${Routes.API_TOKEN_WEBHOOK}?projectName=${projectName}&environmentName=${environmentName}&appName=${appName}`,
63-
)
64-
}
65-
6655
export async function executeWebhookAPI(webhookUrl: string, token: string, data?: object): Promise<any> {
6756
const options = {
6857
method: 'POST',

0 commit comments

Comments
 (0)