Round 4 fixes: scheduler DB save check, empty validation_targets, proxy list page fallback, scheduler frontend state sync, tests

This commit is contained in:
祀梦
2026-04-05 10:31:20 +08:00
parent dc5f050683
commit d5fdfd65d9
8 changed files with 71 additions and 11 deletions

View File

@@ -13,7 +13,9 @@ router = APIRouter(prefix="/api/scheduler", tags=["scheduler"])
async def _save_auto_validate_setting(enabled: bool, settings_repo: SettingsRepository):
"""保存自动验证设置"""
async with get_db() as db:
await settings_repo.save(db, {"auto_validate": enabled})
success = await settings_repo.save(db, {"auto_validate": enabled})
if not success:
raise RuntimeError("保存自动验证设置失败")
@router.post("/start")