Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove GetPublicConfigAsync #646

Merged
merged 1 commit into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

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;
}
}
}
Loading