mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-28 15:28:04 +00:00
The manifests endpoint returns text/plain YAML, but fetchWithSafeDefaults treats string responses as errors and returns the fallback value ([]). Revert useGetReleaseManifest to use fetchWithDefaults which correctly passes through text/plain responses. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -65,15 +65,14 @@ export function useGetReleaseManifest({
|
|||||||
}: {
|
}: {
|
||||||
namespace: string;
|
namespace: string;
|
||||||
chartName: string;
|
chartName: string;
|
||||||
options?: UseQueryOptions<ReleaseManifest[]>;
|
options?: UseQueryOptions<string>;
|
||||||
}) {
|
}) {
|
||||||
return useQuery<ReleaseManifest[]>({
|
return useQuery<string>({
|
||||||
queryKey: ["manifest", namespace, chartName],
|
queryKey: ["manifest", namespace, chartName],
|
||||||
queryFn: () =>
|
queryFn: () =>
|
||||||
apiService.fetchWithSafeDefaults<ReleaseManifest[]>({
|
apiService.fetchWithDefaults<string>(
|
||||||
url: `/api/helm/releases/${namespace}/${chartName}/manifests`,
|
`/api/helm/releases/${namespace}/${chartName}/manifests`
|
||||||
fallback: [],
|
),
|
||||||
}),
|
|
||||||
...(options ?? {}),
|
...(options ?? {}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ export const InstallReleaseChartModal = ({
|
|||||||
} = useDiffData({
|
} = useDiffData({
|
||||||
selectedRepo,
|
selectedRepo,
|
||||||
versionsError: versionsError as unknown as string, // TODO fix it
|
versionsError: versionsError as unknown as string, // TODO fix it
|
||||||
currentVerManifest: currentVerManifest as unknown as string, // TODO fix it
|
currentVerManifest: currentVerManifest ?? "",
|
||||||
selectedVerData,
|
selectedVerData,
|
||||||
chart: chartAddress,
|
chart: chartAddress,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user