mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-15 21:53:36 +01:00
11 lines
419 B
TypeScript
11 lines
419 B
TypeScript
import { useMutation } from '@tanstack/react-query';
|
|
import type { HttpResponse } from '../lib/models';
|
|
import { useSendAnyRequest } from './useSendAnyRequest';
|
|
|
|
export function useSendRequest(id: string | null, options: { download?: boolean } = {}) {
|
|
const sendAnyRequest = useSendAnyRequest(options);
|
|
return useMutation<HttpResponse | null, string>({
|
|
mutationFn: () => sendAnyRequest.mutateAsync(id),
|
|
});
|
|
}
|