mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-26 14:28:04 +00:00
Added bracketSpacing into prettier (#627)
This commit is contained in:
@@ -12,10 +12,10 @@ export function useGetRepositories(
|
||||
options?: UseQueryOptions<HelmRepositories>
|
||||
) {
|
||||
return useQuery<HelmRepositories>({
|
||||
queryKey:["helm", "repositories"],
|
||||
queryKey: ["helm", "repositories"],
|
||||
queryFn: () =>
|
||||
apiService.fetchWithDefaults<HelmRepositories>("/api/helm/repositories"),
|
||||
...(options ?? {})
|
||||
...(options ?? {}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -24,14 +24,17 @@ export function useUpdateRepo(
|
||||
repo: string,
|
||||
options?: UseMutationOptions<void, unknown, void>
|
||||
) {
|
||||
return useMutation<void, unknown, void>({ mutationFn:() => {
|
||||
return apiService.fetchWithDefaults<void>(
|
||||
`/api/helm/repositories/${repo}`,
|
||||
{
|
||||
method: "POST",
|
||||
}
|
||||
);
|
||||
}, ...(options ?? {})});
|
||||
return useMutation<void, unknown, void>({
|
||||
mutationFn: () => {
|
||||
return apiService.fetchWithDefaults<void>(
|
||||
`/api/helm/repositories/${repo}`,
|
||||
{
|
||||
method: "POST",
|
||||
}
|
||||
);
|
||||
},
|
||||
...(options ?? {}),
|
||||
});
|
||||
}
|
||||
|
||||
// Remove repository
|
||||
@@ -39,14 +42,17 @@ export function useDeleteRepo(
|
||||
repo: string,
|
||||
options?: UseMutationOptions<void, unknown, void>
|
||||
) {
|
||||
return useMutation<void, unknown, void>({mutationFn:() => {
|
||||
return apiService.fetchWithDefaults<void>(
|
||||
`/api/helm/repositories/${repo}`,
|
||||
{
|
||||
method: "DELETE",
|
||||
}
|
||||
);
|
||||
}, ...(options ?? {})});
|
||||
return useMutation<void, unknown, void>({
|
||||
mutationFn: () => {
|
||||
return apiService.fetchWithDefaults<void>(
|
||||
`/api/helm/repositories/${repo}`,
|
||||
{
|
||||
method: "DELETE",
|
||||
}
|
||||
);
|
||||
},
|
||||
...(options ?? {}),
|
||||
});
|
||||
}
|
||||
|
||||
export function useChartRepoValues({
|
||||
@@ -57,15 +63,14 @@ export function useChartRepoValues({
|
||||
chart: string;
|
||||
}) {
|
||||
return useQuery<string>({
|
||||
queryKey:["helm", "repositories", "values", chart, version],
|
||||
queryFn:() =>
|
||||
queryKey: ["helm", "repositories", "values", chart, version],
|
||||
queryFn: () =>
|
||||
apiService.fetchWithDefaults<string>(
|
||||
`/api/helm/repositories/values?chart=${chart}&version=${version}`,
|
||||
{
|
||||
headers: { "Content-Type": "text/plain; charset=utf-8" },
|
||||
}
|
||||
),
|
||||
enabled: Boolean(version) && Boolean(chart),
|
||||
}
|
||||
);
|
||||
enabled: Boolean(version) && Boolean(chart),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user