diff --git a/src/resources/Clusters/Agents/ClusterAgent.ts b/src/resources/Clusters/Agents/ClusterAgent.ts index 66cbc024d..db795e2f1 100644 --- a/src/resources/Clusters/Agents/ClusterAgent.ts +++ b/src/resources/Clusters/Agents/ClusterAgent.ts @@ -12,6 +12,6 @@ export default class ClusterAgent extends Resource { } upgrade(clusterId: string, id: string, data: ClusterNodeUpgradeDataModel) { - return this.api.put(`${ClusterAgent.getBaseUrl(clusterId)}/${id}/upgrades`, data); + return this.api.put(`${ClusterAgent.getBaseUrl(clusterId)}/${id}/upgrade`, data); } } diff --git a/src/resources/Clusters/Agents/tests/ClusterAgent.spec.ts b/src/resources/Clusters/Agents/tests/ClusterAgent.spec.ts index 1343dc908..26a330cb8 100644 --- a/src/resources/Clusters/Agents/tests/ClusterAgent.spec.ts +++ b/src/resources/Clusters/Agents/tests/ClusterAgent.spec.ts @@ -32,7 +32,7 @@ describe('clusterAgent', () => { clusterAgent.upgrade(clusterId, agentId, data); expect(api.put).toHaveBeenCalledTimes(1); - expect(api.put).toHaveBeenCalledWith(`${ClusterAgent.getBaseUrl(clusterId)}/${agentId}/upgrades`, data); + expect(api.put).toHaveBeenCalledWith(`${ClusterAgent.getBaseUrl(clusterId)}/${agentId}/upgrade`, data); }); }); }); diff --git a/src/resources/Clusters/Nodes/ClusterNode.ts b/src/resources/Clusters/Nodes/ClusterNode.ts index 4fcb1fb03..ca9f90a8a 100644 --- a/src/resources/Clusters/Nodes/ClusterNode.ts +++ b/src/resources/Clusters/Nodes/ClusterNode.ts @@ -27,6 +27,6 @@ export default class ClusterNode extends Resource { } upgrade(clusterId: string, id: string, data: ClusterNodeUpgradeDataModel) { - return this.api.put(`${ClusterNode.getBaseUrl(clusterId)}/${id}/upgrades`, data); + return this.api.put(`${ClusterNode.getBaseUrl(clusterId)}/${id}/upgrade`, data); } } diff --git a/src/resources/Clusters/Nodes/tests/ClusterNode.spec.ts b/src/resources/Clusters/Nodes/tests/ClusterNode.spec.ts index 4f84d9d0e..2a61385fa 100644 --- a/src/resources/Clusters/Nodes/tests/ClusterNode.spec.ts +++ b/src/resources/Clusters/Nodes/tests/ClusterNode.spec.ts @@ -72,7 +72,7 @@ describe('clusterNode', () => { clusterNode.upgrade(clusterId, nodeId, data); expect(api.put).toHaveBeenCalledTimes(1); - expect(api.put).toHaveBeenCalledWith(`${ClusterNode.getBaseUrl(clusterId)}/${nodeId}/upgrades`, data); + expect(api.put).toHaveBeenCalledWith(`${ClusterNode.getBaseUrl(clusterId)}/${nodeId}/upgrade`, data); }); }); });