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;
|
||||
chartName: string;
|
||||
options?: UseQueryOptions<ReleaseManifest[]>;
|
||||
options?: UseQueryOptions<string>;
|
||||
}) {
|
||||
return useQuery<ReleaseManifest[]>({
|
||||
return useQuery<string>({
|
||||
queryKey: ["manifest", namespace, chartName],
|
||||
queryFn: () =>
|
||||
apiService.fetchWithSafeDefaults<ReleaseManifest[]>({
|
||||
url: `/api/helm/releases/${namespace}/${chartName}/manifests`,
|
||||
fallback: [],
|
||||
}),
|
||||
apiService.fetchWithDefaults<string>(
|
||||
`/api/helm/releases/${namespace}/${chartName}/manifests`
|
||||
),
|
||||
...(options ?? {}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ export const InstallReleaseChartModal = ({
|
||||
} = useDiffData({
|
||||
selectedRepo,
|
||||
versionsError: versionsError as unknown as string, // TODO fix it
|
||||
currentVerManifest: currentVerManifest as unknown as string, // TODO fix it
|
||||
currentVerManifest: currentVerManifest ?? "",
|
||||
selectedVerData,
|
||||
chart: chartAddress,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user