Skip to content

Commit

Permalink
Address CRs
Browse files Browse the repository at this point in the history
  • Loading branch information
kimlisa committed Feb 21, 2025
1 parent 7130b04 commit 6e4a79f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function useIntegrationOperation() {
return integrationService.deleteIntegration({
name: operation.item.name,
clusterId,
associatedResources: opt.deleteAssociatedResources,
deleteAssociatedResources: opt.deleteAssociatedResources,
});
}

Expand Down
9 changes: 6 additions & 3 deletions web/packages/teleport/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1113,14 +1113,17 @@ const cfg = {
},

getDeleteIntegrationUrlV2(req: IntegrationDeleteRequest) {
const path = cfg.api.integration.deleteV2
// Not using generatePath here because it doesn't work
// when a dynamic path and a query param is next to each other.
// eg: some/path/:name?queryParmKey=queryParamValue it will
// remove the required ? in the path.
return cfg.api.integration.deleteV2
.replace(':clusterId', req.clusterId)
.replace(':name', req.name)
.replace(
':associatedresources',
req.associatedResources ? 'true' : 'false'
req.deleteAssociatedResources ? 'true' : 'false'
);
return generatePath(path, req);
},

getIntegrationStatsUrl(name: string) {
Expand Down
2 changes: 1 addition & 1 deletion web/packages/teleport/src/services/integrations/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -995,5 +995,5 @@ export type IntegrationDeleteRequest = {
*
* Not all integration kinds supports resource cleanup.
*/
associatedResources?: boolean;
deleteAssociatedResources?: boolean;
};

0 comments on commit 6e4a79f

Please sign in to comment.