fix(servers): исправить сохранение и опрос серверов

This commit is contained in:
Denozordec committed 2026-09-13 09:32:37 +07:00
1 parent 88326d9851
commit c30f817926
10 files changed
+635 -62

No files matched your search

+8 -1
View File
@@ -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