Update plugins/kubernetes-backend/src/service/KubernetesProxy.ts

Co-authored-by: Jamie Klassen <jklassen@vmware.com>
Signed-off-by: Carlos Esteban Lopez Jaramillo <luchillo17@gmail.com>
This commit is contained in:
Carlos Esteban Lopez Jaramillo
2022-11-15 12:22:02 -05:00
committed by Fredrik Adelöw
parent edc9ed6952
commit cead48f628
@@ -63,13 +63,9 @@ export class KubernetesProxy {
const response = await this.makeRequestToCluster(clusterDetails, req);
const contentType = req.header(HEADER_CONTENT_TYPE) || APPLICATION_JSON;
const data = await response.text();
const data = contentType.includes(APPLICATION_JSON)
? await response.json()
: await response.text();
res.status(response.status).json(data);
res.status(response.status).send(data);
};
public get clustersSupplier(): KubernetesClustersSupplier {