|
|
@ -114,7 +114,7 @@ export function useApi<Data = any, RequestConfig = any>({ |
|
|
|
|
|
|
|
|
|
|
|
onRequestFinish() |
|
|
|
onRequestFinish() |
|
|
|
|
|
|
|
|
|
|
|
return requestError |
|
|
|
return Promise.reject(requestError) |
|
|
|
}, |
|
|
|
}, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -125,7 +125,7 @@ export function useApi<Data = any, RequestConfig = any>({ |
|
|
|
|
|
|
|
|
|
|
|
onRequestFinish() |
|
|
|
onRequestFinish() |
|
|
|
|
|
|
|
|
|
|
|
return apiResponse |
|
|
|
return Promise.resolve(apiResponse) |
|
|
|
}, |
|
|
|
}, |
|
|
|
(apiError) => { |
|
|
|
(apiError) => { |
|
|
|
errorHook.trigger(apiError) |
|
|
|
errorHook.trigger(apiError) |
|
|
@ -133,7 +133,7 @@ export function useApi<Data = any, RequestConfig = any>({ |
|
|
|
|
|
|
|
|
|
|
|
onRequestFinish() |
|
|
|
onRequestFinish() |
|
|
|
|
|
|
|
|
|
|
|
return apiError |
|
|
|
return Promise.reject(apiError) |
|
|
|
}, |
|
|
|
}, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|