diff options
Diffstat (limited to 'server/sonar-web/src/main/js/queries/fix-suggestions.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/queries/fix-suggestions.tsx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/server/sonar-web/src/main/js/queries/fix-suggestions.tsx b/server/sonar-web/src/main/js/queries/fix-suggestions.tsx index 8edcb03f044..4a125384e82 100644 --- a/server/sonar-web/src/main/js/queries/fix-suggestions.tsx +++ b/server/sonar-web/src/main/js/queries/fix-suggestions.tsx @@ -23,10 +23,10 @@ import { AxiosError } from 'axios'; import { some } from 'lodash'; import React, { useContext } from 'react'; import { - checkSuggestionServiceStatus, + getFixSuggestionServiceInfo, getFixSuggestionsIssues, getSuggestions, - SuggestionServiceStatusCheckResponse, + ServiceInfo, updateFeatureEnablement, } from '../api/fix-suggestions'; import { useAvailableFeatures } from '../app/components/available-features/withAvailableFeatures'; @@ -184,14 +184,15 @@ export function withUseGetFixSuggestionsIssues<P extends { issue: Issue }>( }; } -export function useUpdateFeatureEnablementMutation() { - return useMutation({ - mutationFn: updateFeatureEnablement, +export function useGetServiceInfoQuery() { + return useQuery<ServiceInfo, AxiosError>({ + queryKey: ['fix-suggestions', 'service-info'], + queryFn: getFixSuggestionServiceInfo, }); } -export function useCheckServiceMutation() { - return useMutation<SuggestionServiceStatusCheckResponse, AxiosError>({ - mutationFn: checkSuggestionServiceStatus, +export function useUpdateFeatureEnablementMutation() { + return useMutation({ + mutationFn: updateFeatureEnablement, }); } |