(res: Response)
| 1 | import { QueryClient, QueryFunction } from "@tanstack/react-query"; |
| 2 | |
| 3 | async function throwIfResNotOk(res: Response) { |
| 4 | if (!res.ok) { |
| 5 | const text = (await res.text()) || res.statusText; |
| 6 | throw new Error(`${res.status}: ${text}`); |
| 7 | } |
| 8 | } |
| 9 | |
| 10 | export async function apiRequest( |
| 11 | method: string, |
no outgoing calls
no test coverage detected