1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 07:19:41 +02:00

fix(k8s/storage): missing endpoint id in storage patch request (#4174)

This commit is contained in:
Maxime Bajeux 2020-08-08 00:43:34 +02:00 committed by GitHub
parent 26ee78e1e7
commit e7a33347c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View file

@ -37,10 +37,11 @@ class KubernetesStorageService {
/**
* PATCH
*/
async patchAsync(oldStorageClass, newStorageClass) {
async patchAsync(endpointId, oldStorageClass, newStorageClass) {
try {
const params = new KubernetesCommonParams();
params.id = newStorageClass.Name;
params.endpointId = endpointId;
const payload = KubernetesStorageClassConverter.patchPayload(oldStorageClass, newStorageClass);
await this.KubernetesStorage().patch(params, payload).$promise;
} catch (err) {
@ -48,8 +49,8 @@ class KubernetesStorageService {
}
}
patch(oldStorageClass, newStorageClass) {
return this.$async(this.patchAsync, oldStorageClass, newStorageClass);
patch(endpointId, oldStorageClass, newStorageClass) {
return this.$async(this.patchAsync, endpointId, oldStorageClass, newStorageClass);
}
}