1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Refactor query keys to enum

This commit is contained in:
viown 2025-02-23 17:38:31 +03:00
parent dd539b89ca
commit a7621d242d
7 changed files with 18 additions and 15 deletions

View file

@ -3,7 +3,7 @@ import { getScheduledTasksApi } from '@jellyfin/sdk/lib/utils/api/scheduled-task
import { useMutation } from '@tanstack/react-query';
import { useApi } from 'hooks/useApi';
import { queryClient } from 'utils/query/queryClient';
import { QUERY_KEY } from './useTasks';
import { QueryKey } from './queryKey';
export const useStopTask = () => {
const { api } = useApi();
@ -15,7 +15,7 @@ export const useStopTask = () => {
),
onSuccess: () => {
void queryClient.invalidateQueries({
queryKey: [ QUERY_KEY ]
queryKey: [ QueryKey.Tasks ]
});
}
});