Replacing stores key from "kind" to "apiBase"

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2021-02-09 14:27:02 +03:00
1 parent 0b79bd667d
commit 8b7ff53f9d
1 file changed
+2 -2
+2 -2
View File
@@ -46,12 +46,12 @@ export class ApiManager {
@action
registerStore(store: KubeObjectStore, apis: KubeApi[] = [store.api]) {
apis.forEach(api => {
this.stores.set(api.kind, store);
this.stores.set(api.apiBase, store);
});
}
getStore<S extends KubeObjectStore>(api: string | KubeApi): S {
return this.stores.get(this.resolveApi(api)?.kind) as S;
return this.stores.get(this.resolveApi(api)?.apiBase) as S;
}
}