fix(ui): проверять подтверждение восстановления сетевых настроек
This commit is contained in:
1 parent
d0f5649725
commit
3dd4ad34ee
9 files changed
+33
-8
No files matched your search
@@ -1998,10 +1998,11 @@ function FirewallPageInner() {
|
||||
if (!isLive || !historyServerId) return
|
||||
setHistoryRestoring(true)
|
||||
try {
|
||||
await apiFetch(
|
||||
const res = await apiFetch<{ ok: boolean }>(
|
||||
`/api/firewall/revisions/${encodeURIComponent(id)}/restore`,
|
||||
{ method: "POST", body: JSON.stringify({ serverId: historyServerId }) },
|
||||
)
|
||||
if (res?.ok !== true) throw new Error("Сервер не подтвердил восстановление")
|
||||
toast.success("Версия применена на роутер")
|
||||
await loadLive()
|
||||
await loadRevisions()
|
||||
|
||||
Reference in new issue
Block a user