fix(proxy): proxy provider health check not working, closes #282

This commit is contained in:
kunish 2023-09-25 11:12:20 +08:00
parent 713ffb090a
commit db24ad20bb
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430
2 changed files with 3 additions and 2 deletions

View File

@ -128,7 +128,7 @@ export const updateProxyProviderAPI = (providerName: string) => {
return request.put(`providers/proxies/${providerName}`)
}
export const proxyProviderHealthCheck = (providerName: string) => {
export const proxyProviderHealthCheckAPI = (providerName: string) => {
const request = useRequest()
return request.get(`providers/proxies/${providerName}/healthcheck`, {

View File

@ -5,6 +5,7 @@ import {
fetchProxyProvidersAPI,
proxyGroupLatencyTestAPI,
proxyLatencyTestAPI,
proxyProviderHealthCheckAPI,
selectProxyInGroupAPI,
updateProxyProviderAPI,
} from '~/apis'
@ -185,7 +186,7 @@ export const useProxies = () => {
const proxyProviderLatencyTest = (providerName: string) =>
setProxyProviderLatencyTestingMap(providerName, async () => {
await proxyProviderLatencyTest(providerName)
await proxyProviderHealthCheckAPI(providerName)
await fetchProxies()
})