fix(servers): исправить сохранение и опрос серверов
This commit is contained in:
1 parent
88326d9851
commit
c30f817926
10 files changed
+635
-62
No files matched your search
@@ -7,7 +7,14 @@ import {
|
||||
type ServerUpdate,
|
||||
type TestConnectionRequest,
|
||||
} from "@mmapp/contracts/servers"
|
||||
import { requestJson } from "@/shared/api/http-client"
|
||||
import { requestJson as httpRequestJson } from "@/shared/api/http-client"
|
||||
|
||||
function requestJson<T>(baseUrl: string, path: string, init?: RequestInit): Promise<T> {
|
||||
return httpRequestJson<T>(baseUrl, path, {
|
||||
...init,
|
||||
signal: AbortSignal.timeout(path.endsWith("/poll") ? 60_000 : 30_000),
|
||||
})
|
||||
}
|
||||
|
||||
type TestConnectionResponse = {
|
||||
success: boolean
|
||||
|
||||
Reference in new issue
Block a user