Skip to content

Commit

Permalink
refactor: Remove GetPublicConfigAsync (#646)
Browse files Browse the repository at this point in the history
  • Loading branch information
wzh425 authored Dec 14, 2024
1 parent 2dad71d commit e47a489
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.

This file was deleted.

10 changes: 0 additions & 10 deletions Masa.Dcc.Infrastructure.Domain/App/QueryHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,4 @@ public async Task GetConfigObjectsAsync(ConfigObjectsByDynamicQuery query)
{
query.Result = await _configObjectDomainService.GetConfigObjectsAsync(query.environment, query.cluster, query.appId, query.configObjects);
}

[EventHandler]
public async Task GetPublicConfigAsync(PublicConfigQuery query)
{
query.Result = await _configurationApiClient.GetAsync<Dictionary<string, string>>(
query.Environment,
query.Cluster,
"public-$Config",
query.ConfigObject);
}
}
8 changes: 0 additions & 8 deletions src/Services/Masa.Dcc.Service/Services/OpenApiService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public OpenApiService()
App.MapPut("open-api/releasing/{environment}/{cluster}/{appId}/{configObject}", UpdateConfigObjectAsync);
App.MapPost("open-api/releasing/{environment}/{cluster}/{appId}/{isEncryption}", AddConfigObjectAsync);
App.MapPost("open-api/releasing/get/{environment}/{cluster}/{appId}", GetConfigObjectsAsync);
App.MapGet("open-api/releasing/{environment}/{cluster}/publicConfig/{configObject}", GetPublicConfigAsync);
}

public async Task UpdateConfigObjectAsync(IEventBus eventBus, string environment, string cluster, string appId, string configObject,
Expand All @@ -36,12 +35,5 @@ public async Task<Dictionary<string, PublishReleaseModel>> GetConfigObjectsAsync
await eventBus.PublishAsync(query);
return query.Result;
}

public async Task<Dictionary<string, string>> GetPublicConfigAsync(IEventBus eventBus, string environment, string cluster, string configObject)
{
var query = new PublicConfigQuery(environment, cluster, configObject);
await eventBus.PublishAsync(query);
return query.Result;
}
}
}

0 comments on commit e47a489

Please sign in to comment.