Download response, and some fixes

This commit is contained in:
Gregory Schier
2024-01-16 17:02:55 -08:00
parent 33374eefc7
commit ac1e646e68
12 changed files with 2650 additions and 4804 deletions

View File

@@ -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),
});
}