mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
More clear apiBase initialization
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
66c005657f
commit
50e2b2e75d
@ -217,7 +217,7 @@ export class KubeApi<
|
|||||||
readonly kind: string;
|
readonly kind: string;
|
||||||
readonly apiVersion: string;
|
readonly apiVersion: string;
|
||||||
|
|
||||||
@observable apiBase = "";
|
@observable apiBase: string;
|
||||||
|
|
||||||
apiPrefix: string;
|
apiPrefix: string;
|
||||||
apiGroup: string;
|
apiGroup: string;
|
||||||
@ -245,7 +245,6 @@ export class KubeApi<
|
|||||||
fallbackApiBases,
|
fallbackApiBases,
|
||||||
} = opts;
|
} = opts;
|
||||||
|
|
||||||
makeObservable(this);
|
|
||||||
assert(fullApiPathname, "apiBase MUST be provied either via KubeApiOptions.apiBase or KubeApiOptions.objectConstructor.apiBase");
|
assert(fullApiPathname, "apiBase MUST be provied either via KubeApiOptions.apiBase or KubeApiOptions.objectConstructor.apiBase");
|
||||||
assert(request, "request MUST be provided if not in a cluster page frame context");
|
assert(request, "request MUST be provided if not in a cluster page frame context");
|
||||||
|
|
||||||
@ -266,6 +265,7 @@ export class KubeApi<
|
|||||||
this.apiResource = resource;
|
this.apiResource = resource;
|
||||||
this.request = request;
|
this.request = request;
|
||||||
this.objectConstructor = objectConstructor;
|
this.objectConstructor = objectConstructor;
|
||||||
|
makeObservable(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
get apiVersionWithGroup() {
|
get apiVersionWithGroup() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user