Skip to content

Commit

Permalink
fix(clusters): fix backend path typo
Browse files Browse the repository at this point in the history
  • Loading branch information
GermainBergeron committed Nov 7, 2019
1 parent 5ffde1a commit 9d7ff1b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/resources/Clusters/Agents/ClusterAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ export default class ClusterAgent extends Resource {
}

upgrade(clusterId: string, id: string, data: ClusterNodeUpgradeDataModel) {
return this.api.put<ClusterNodeUpgradeModel[]>(`${ClusterAgent.getBaseUrl(clusterId)}/${id}/upgrades`, data);
return this.api.put<ClusterNodeUpgradeModel[]>(`${ClusterAgent.getBaseUrl(clusterId)}/${id}/upgrade`, data);
}
}
2 changes: 1 addition & 1 deletion src/resources/Clusters/Agents/tests/ClusterAgent.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
});
2 changes: 1 addition & 1 deletion src/resources/Clusters/Nodes/ClusterNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ export default class ClusterNode extends Resource {
}

upgrade(clusterId: string, id: string, data: ClusterNodeUpgradeDataModel) {
return this.api.put<ClusterNodeUpgradeModel[]>(`${ClusterNode.getBaseUrl(clusterId)}/${id}/upgrades`, data);
return this.api.put<ClusterNodeUpgradeModel[]>(`${ClusterNode.getBaseUrl(clusterId)}/${id}/upgrade`, data);
}
}
2 changes: 1 addition & 1 deletion src/resources/Clusters/Nodes/tests/ClusterNode.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
});

0 comments on commit 9d7ff1b

Please sign in to comment.