mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-02 18:41:35 +08:00
refactor(backend): migrate import/export to use SQL backup
- Reimplement export_config_to_file to use database.export_sql - Reimplement import_config_from_file to use database.import_sql - Add sync_current_from_db to sync live configs after import - Add settings database binding on app initialization - Remove deprecated JSON-based config import logic
This commit is contained in:
@@ -570,6 +570,7 @@ pub fn run() {
|
||||
}
|
||||
}
|
||||
|
||||
crate::settings::bind_db(db.clone());
|
||||
let app_state = AppState::new(db);
|
||||
|
||||
// 检查是否需要首次导入(数据库为空)
|
||||
|
||||
Reference in New Issue
Block a user