mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-27 11:51:13 +01:00
Download response, and some fixes
This commit is contained in:
@@ -2,9 +2,9 @@ import { useMutation } from '@tanstack/react-query';
|
||||
import type { HttpResponse } from '../lib/models';
|
||||
import { useSendAnyRequest } from './useSendAnyRequest';
|
||||
|
||||
export function useSendRequest(id: string | null) {
|
||||
const sendAnyRequest = useSendAnyRequest();
|
||||
return useMutation<HttpResponse, string>({
|
||||
export function useSendRequest(id: string | null, options: { download?: boolean } = {}) {
|
||||
const sendAnyRequest = useSendAnyRequest(options);
|
||||
return useMutation<HttpResponse | null, string>({
|
||||
mutationFn: () => sendAnyRequest.mutateAsync(id),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user