Fix Redundance Reference
This commit is contained in:
@@ -1,16 +1,24 @@
|
||||
using AMREZ.EOP.Abstractions.Applications.Tenancy;
|
||||
using AMREZ.EOP.Abstractions.Applications.UseCases.Authentications;
|
||||
using AMREZ.EOP.Abstractions.Applications.UseCases.HumanResources;
|
||||
using AMREZ.EOP.Abstractions.Applications.UseCases.Payments.SlipVerification;
|
||||
using AMREZ.EOP.Abstractions.Applications.UseCases.Payments.SlipVerification.QrDecode;
|
||||
using AMREZ.EOP.Abstractions.Applications.UseCases.Tenancy;
|
||||
using AMREZ.EOP.Abstractions.Infrastructures.Common;
|
||||
using AMREZ.EOP.Abstractions.Infrastructures.Integrations.SCB.Clients;
|
||||
using AMREZ.EOP.Abstractions.Infrastructures.Repositories;
|
||||
using AMREZ.EOP.Abstractions.Security;
|
||||
using AMREZ.EOP.Abstractions.Storage;
|
||||
using AMREZ.EOP.Application.UseCases.Authentications;
|
||||
using AMREZ.EOP.Application.UseCases.HumanResources;
|
||||
using AMREZ.EOP.Application.UseCases.Payments.SlipVerification;
|
||||
using AMREZ.EOP.Application.UseCases.Payments.SlipVerification.BankDetect;
|
||||
using AMREZ.EOP.Application.UseCases.Payments.SlipVerification.QrDecode;
|
||||
using AMREZ.EOP.Application.UseCases.Tenancy;
|
||||
using AMREZ.EOP.Domain.Shared.Payments;
|
||||
using AMREZ.EOP.Domain.Shared.Tenancy;
|
||||
using AMREZ.EOP.Infrastructures.Data;
|
||||
using AMREZ.EOP.Infrastructures.Integrations.SCB.Clients;
|
||||
using AMREZ.EOP.Infrastructures.Options;
|
||||
using AMREZ.EOP.Infrastructures.Repositories;
|
||||
using AMREZ.EOP.Infrastructures.Security;
|
||||
@@ -30,7 +38,17 @@ public static class ServiceCollectionExtensions
|
||||
{
|
||||
services.AddHttpContextAccessor();
|
||||
services.AddScoped<IJwtFactory, JwtFactory>();
|
||||
|
||||
|
||||
services.AddSingleton(new SCBOptions());
|
||||
|
||||
services.AddHttpClient<IScbSlipClient, ScbSlipClient>((sp, http) =>
|
||||
{
|
||||
var o = sp.GetRequiredService<SCBOptions>();
|
||||
var baseUrl = o.BaseUrl.EndsWith('/') ? o.BaseUrl[..^1] : o.BaseUrl;
|
||||
http.BaseAddress = new Uri(baseUrl + "/v1/");
|
||||
http.Timeout = TimeSpan.FromSeconds(20);
|
||||
});
|
||||
|
||||
// Options
|
||||
services.AddOptions<AuthOptions>()
|
||||
.BindConfiguration("Connections")
|
||||
@@ -116,6 +134,11 @@ public static class ServiceCollectionExtensions
|
||||
services.AddScoped<IListTenantsUseCase, ListTenantsUseCase>();
|
||||
services.AddScoped<IListDomainsUseCase, ListDomainsUseCase>();
|
||||
|
||||
|
||||
// UseCase & helpers (no OCR)
|
||||
services.AddScoped<IQrDecoder, ZxingQrDecoder>();
|
||||
services.AddScoped<IVerifyFromImageUseCase, VerifyFromImageUseCase>();
|
||||
|
||||
// Redis (optional)
|
||||
services.AddSingleton<IConnectionMultiplexer?>(sp =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user