MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / rollbackRepairPoint

Function rollbackRepairPoint

static/js/selfcheck.js:459–473  ·  view source on GitHub ↗
(rollbackId, btn)

Source from the content-addressed store, hash-verified

457}
458
459async function rollbackRepairPoint(rollbackId, btn) {
460 const id = String(rollbackId || '').trim();
461 if (!id) return;
462 if (btn) loading.show(btn, '回滚中...');
463 try {
464 const data = await api.post(`/selfcheck/repair-center/rollbacks/${encodeURIComponent(id)}/rollback`, {});
465 toast.success(`回滚完成:恢复账号 ${Number(data?.result?.restored_accounts || 0)} 条`);
466 await loadRuns();
467 await loadRepairRollbacks();
468 } catch (error) {
469 toast.error(`回滚失败: ${parseErrorMessage(error)}`);
470 } finally {
471 if (btn) loading.hide(btn);
472 }
473}
474
475function bindEvents() {
476 const runBtn = document.getElementById('selfcheck-run-btn');

Callers 1

bindEventsFunction · 0.85

Calls 8

loadRunsFunction · 0.85
loadRepairRollbacksFunction · 0.85
parseErrorMessageFunction · 0.85
successMethod · 0.80
errorMethod · 0.80
hideMethod · 0.80
showMethod · 0.45
postMethod · 0.45

Tested by

no test coverage detected