增加仅切换注册表功能,防止覆盖删除数据

This commit is contained in:
2025-10-11 16:10:12 +08:00
parent 9cd1abfe75
commit 8de12dbcfc
3 changed files with 114 additions and 19 deletions
+8
View File
@@ -1262,6 +1262,14 @@ router.put('/registry/config', async (req, res) => {
// 更新配置
const updatedConfig = await downloadService.cacheConfigManager.updateConfig(updateData);
// 如果更新了存储模式,需要重新加载存储模式配置
if (storageMode) {
const reloadResult = await downloadService.downloadRegistry.reloadStorageMode();
if (!reloadResult.success) {
logger.warn('重新加载存储模式失败:', reloadResult.error);
}
}
res.json({
success: true,
data: {