diff --git a/src/WorkFlow.API/Program.cs b/src/WorkFlow.API/Program.cs index 0966360..8720fca 100644 --- a/src/WorkFlow.API/Program.cs +++ b/src/WorkFlow.API/Program.cs @@ -47,7 +47,7 @@ try ?? throw new InvalidOperationException( "The 'MediatRLicense' configuration value is missing or empty." + "Please ensure it is properly set in the configuration source."); - builder.Services.AddWorkFlowServices(opt => opt.MediatRLicense = mediatRLicense).AddWorkFlowRepositories(); + builder.Services.AddWorkFlowServices(mediatRLicense).AddWorkFlowRepositories(); builder.Services.AddUserManager(); diff --git a/src/WorkFlow.Application/DependencyInjection.cs b/src/WorkFlow.Application/DependencyInjection.cs index 1928fa8..05dac04 100644 --- a/src/WorkFlow.Application/DependencyInjection.cs +++ b/src/WorkFlow.Application/DependencyInjection.cs @@ -5,7 +5,7 @@ namespace WorkFlow.Application; public static class DependencyInjection { - public static IServiceCollection AddWorkFlowServices(this IServiceCollection services, Action? options = null) + public static IServiceCollection AddWorkFlowServices(this IServiceCollection services, string mediatRLicense, Action? options = null) { WorkFlowServiceOptions diOptions = new(); options?.Invoke(diOptions); @@ -14,7 +14,7 @@ public static class DependencyInjection services.AddMediatR(cfg => { cfg.RegisterServicesFromAssembly(typeof(DependencyInjection).Assembly); - cfg.LicenseKey = diOptions.MediatRLicense; + cfg.LicenseKey = mediatRLicense; }); services.AddSingleton(diOptions.UriBuilderFactory()); @@ -25,8 +25,6 @@ public static class DependencyInjection public class WorkFlowServiceOptions { - public string MediatRLicense { get; set; } = string.Empty; - public Func UriBuilderFactory { get; set; } = () => new UriBuilder(); } } \ No newline at end of file diff --git a/src/WorkFlow.Application/Mapping/MappingProfile.cs b/src/WorkFlow.Application/Mapping/MappingProfile.cs index ac10a45..7e2cccd 100644 --- a/src/WorkFlow.Application/Mapping/MappingProfile.cs +++ b/src/WorkFlow.Application/Mapping/MappingProfile.cs @@ -30,6 +30,6 @@ public class MappingProfile : AutoMapper.Profile CreateMap() .ForMember(dest => dest.Url, opt => opt.MapFrom()) - .ForMember(dest => dest.Url, opt => opt.MapFrom()); + .ForMember(dest => dest.IconUrl, opt => opt.MapFrom()); } } \ No newline at end of file