From e27b2dc63ff1356e8d80212d3aa023cb9b652b3e Mon Sep 17 00:00:00 2001 From: Harris Zhang Date: Sat, 7 Sep 2024 09:16:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E5=9C=A8=E4=B8=BB=E5=BA=93=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=E5=88=A0=E9=99=A4=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AgileConfig.Server.Service/AppService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/AgileConfig.Server.Service/AppService.cs b/src/AgileConfig.Server.Service/AppService.cs index 67d2af93..f2800f94 100644 --- a/src/AgileConfig.Server.Service/AppService.cs +++ b/src/AgileConfig.Server.Service/AppService.cs @@ -59,6 +59,8 @@ public async Task DeleteAsync(App app) app = await _appRepository.GetAsync(app.Id); if (app != null) { + await _appRepository.DeleteAsync(app); + var envs = await _settingService.GetEnvironmentList(); var updatedConfigIds = new List(); var updatedConfigPublishedIds = new List(); @@ -67,7 +69,7 @@ public async Task DeleteAsync(App app) { using var configRepository = _configRepositoryAccessor(env); using var configPublishedRepository = _configPublishedRepositoryAccessor(env); - await _appRepository.DeleteAsync(app); + //怕有的同学误删app导致要恢复,所以保留配置项吧。 var configs = await configRepository.QueryAsync(x => x.AppId == app.Id); var waitDeleteConfigs = new List();