fix: align backend APIs and upload flow
This commit is contained in:
@@ -20,9 +20,16 @@ namespace MessageService.WebApi
|
||||
services.AddScoped<ConversationService>();
|
||||
services.AddScoped<SquenceService>();
|
||||
services.AddScoped<IContactIntegrationService, ContactIntegrationService>();
|
||||
services.AddHttpClient<IGroupMemberIntegrationService, GroupMemberIntegrationService>(c =>
|
||||
services.AddHttpClient<IGroupMemberIntegrationService, GroupMemberIntegrationService>((sp, c) =>
|
||||
{
|
||||
c.BaseAddress = new Uri("http://im-group-service:8080/");
|
||||
var configuration = sp.GetRequiredService<IConfiguration>();
|
||||
c.BaseAddress = new Uri(configuration["InternalServices:GroupServiceBaseUrl"]
|
||||
?? "http://im-group-service:8080/");
|
||||
var internalApiKey = configuration["InternalApiKey"];
|
||||
if (!string.IsNullOrWhiteSpace(internalApiKey))
|
||||
{
|
||||
c.DefaultRequestHeaders.Add("X-Internal-Api-Key", internalApiKey);
|
||||
}
|
||||
});
|
||||
services.AddGrpcClient<ContactInternal.ContactInternalClient>((sp, o) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user