mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Getting api by kind when editing an object (#1936)
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
c05fe21c68
commit
131a6fb410
@ -18,7 +18,7 @@ export const resourceApplierApi = {
|
|||||||
.post<KubeJsonApiData[]>("/stack", { data: resource })
|
.post<KubeJsonApiData[]>("/stack", { data: resource })
|
||||||
.then(data => {
|
.then(data => {
|
||||||
const items = data.map(obj => {
|
const items = data.map(obj => {
|
||||||
const api = apiManager.getApi(obj.metadata.selfLink);
|
const api = apiManager.getApiByKind(obj.kind, obj.apiVersion);
|
||||||
|
|
||||||
if (api) {
|
if (api) {
|
||||||
return new api.objectConstructor(obj);
|
return new api.objectConstructor(obj);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user