From ff97e80982cd0d68e03edc0607681e903d189cf2 Mon Sep 17 00:00:00 2001 From: Vincent T Date: Fri, 12 Jul 2024 11:35:56 -0400 Subject: [PATCH] frontend: Adds JSON / object / KubeObjectInterface options Signed-off-by: Vincent T --- frontend/src/lib/k8s/apiProxy.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/k8s/apiProxy.ts b/frontend/src/lib/k8s/apiProxy.ts index 9842bdf467..e4169fee6d 100644 --- a/frontend/src/lib/k8s/apiProxy.ts +++ b/frontend/src/lib/k8s/apiProxy.ts @@ -679,8 +679,11 @@ function singleApiFactory(group: string, version: string, resource: string) { queryParams?: QueryParameters, cluster?: string ) => streamResult(url, name, cb, errCb, queryParams, cluster), - post: (body: KubeObjectInterface, queryParams?: QueryParameters, cluster?: string) => - post(url + asQuery(queryParams), body, true, { cluster }), + post: ( + body: JSON | object | KubeObjectInterface, + queryParams?: QueryParameters, + cluster?: string + ) => post(url + asQuery(queryParams), body, true, { cluster }), put: (body: KubeObjectInterface, queryParams?: QueryParameters, cluster?: string) => put(`${url}/${body.metadata.name}` + asQuery(queryParams), body, true, { cluster }), patch: (body: OpPatch[], name: string, queryParams?: QueryParameters, cluster?: string) =>