File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 11import { useQuery , UseQueryResult } from "react-query" ;
22
3- const BLUEAPI_SOCKET = import . meta. env . VITE_BLUEAPI_SOCKET ;
3+ const BLUEAPI_SOCKET : string = import . meta. env . VITE_BLUEAPI_SOCKET ;
4+
45export type BlueApiWorkerState =
56 | "IDLE"
67 | "RUNNING"
@@ -13,9 +14,14 @@ export type BlueApiWorkerState =
1314 | "PANICKED"
1415 | "UNKNOWN" ;
1516
16- function blueApiCall ( endpoint : string , method ?: string , body ?: object ) {
17+ function blueApiCall (
18+ endpoint : string ,
19+ method ?: string ,
20+ body ?: object
21+ ) : Promise < Response > {
1722 const _method = method ?? "GET" ;
18- return fetch ( BLUEAPI_SOCKET + endpoint , {
23+ const fullUrl = BLUEAPI_SOCKET + endpoint ;
24+ return fetch ( fullUrl , {
1925 headers : {
2026 Accept : "application/json" ,
2127 "Content-Type" : "application/json" ,
You can’t perform that action at this time.
0 commit comments