mirror of
https://github.com/wuzf/2fa.git
synced 2026-09-03 07:17:09 +08:00
Centralize backup serialization in utils/backup-format.js with a single createBackupEntry() path shared by scheduled backups, manual backups and exports. Introduce utils/backup-index.js for KV key listing/pruning and utils/data-hash.js for change detection, replacing ad-hoc helpers scattered across api/secrets/backup.js, restore.js and worker.js. UI backup/export modules consume the shared format so HTML/JSON/CSV exports round-trip through the same schema.