fix(ui): подтверждать сохранение peer IPsec
This commit is contained in:
1 parent
611f31875e
commit
f5b64ea154
7 files changed
+115
-23
No files matched your search
+3
-1
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user