1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2023-01-05 15:42:34 +02:00
parent 3fc5a0a81d
commit 4615fcef1d

View File

@ -5,7 +5,8 @@
import type { KubeObjectMetadata, KubeObjectScope } from "../kube-object";
import { KubeObject } from "../kube-object";
import { KubeApi, ResourceDescriptor } from "../kube-api";
import type { ResourceDescriptor } from "../kube-api";
import { KubeApi } from "../kube-api";
export class IngressClassApi extends KubeApi<IngressClass> {
constructor() {
@ -16,7 +17,7 @@ export class IngressClassApi extends KubeApi<IngressClass> {
});
}
setAsDefault({ name }: ResourceDescriptor, isDefault: boolean = true) {
setAsDefault({ name }: ResourceDescriptor, isDefault = true) {
const reqUrl = this.formatUrlForNotListing({ name });
return this.request.patch(reqUrl, {
@ -24,9 +25,9 @@ export class IngressClassApi extends KubeApi<IngressClass> {
metadata: {
annotations: {
[IngressClass.ANNOTATION_IS_DEFAULT]: JSON.stringify(isDefault),
}
}
}
},
},
},
}, {
headers: {
"content-type": "application/strategic-merge-patch+json",