fix(ui): подтверждать сохранение peer IPsec

This commit is contained in:
Denozordec committed 2026-09-29 19:31:55 +07:00
1 parent 611f31875e
commit f5b64ea154
7 files changed
+115 -23

No files matched your search

+3 -1
View File
@@ -157,11 +157,13 @@ export async function patchIpsecPeer(
peerId: string,
patch: IpsecPeerPatch,
): Promise<{ ok: boolean }> {
return requestJson<{ ok: boolean }>(
const result = await requestJson<{ ok: boolean }>(
baseUrl,
`/api/ipsec/peers/${encodeURIComponent(serverId)}/${encodeURIComponent(peerId)}`,
{ method: "PATCH", body: JSON.stringify(patch) },
)
if (result?.ok !== true) throw new Error("Сервер не подтвердил сохранение peer")
return result
}
export async function deleteIpsecPeer(