mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-20 08:33:52 +01:00
Add mutationKey everywhere
This commit is contained in:
@@ -5,6 +5,7 @@ import { useUpdateAnyHttpRequest } from './useUpdateAnyHttpRequest';
|
||||
export function useUpdateHttpRequest(id: string | null) {
|
||||
const updateAnyRequest = useUpdateAnyHttpRequest();
|
||||
return useMutation<void, unknown, Partial<HttpRequest> | ((r: HttpRequest) => HttpRequest)>({
|
||||
mutationKey: ['update_http_request', id],
|
||||
mutationFn: async (update) => updateAnyRequest.mutateAsync({ id: id ?? 'n/a', update }),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user