Skip to content

Commit

Permalink
只在主库里面删除应用
Browse files Browse the repository at this point in the history
  • Loading branch information
harris2012 authored Sep 7, 2024
1 parent dfe842a commit e27b2dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/AgileConfig.Server.Service/AppService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public async Task<bool> 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<string>();
var updatedConfigPublishedIds = new List<string>();
Expand All @@ -67,7 +69,7 @@ public async Task<bool> 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<Config>();
Expand Down

0 comments on commit e27b2dc

Please sign in to comment.