This commit is contained in:
Sébastien André
2021-04-18 10:49:21 +02:00
parent 9f58e2b31a
commit f671d0b1d0
9 changed files with 95 additions and 90 deletions

View File

@@ -6,6 +6,7 @@ using skydiveLogs_api.DomainBusiness.Interfaces;
using skydiveLogs_api.DomainService.Repositories;
using skydiveLogs_api.Infrastructure;
using skydiveLogs_api.Infrastructure.Interfaces;
using System.Security.Claims;
namespace skydiveLogs_api.Ioc
{
@@ -38,7 +39,7 @@ namespace skydiveLogs_api.Ioc
_services.AddSingleton<ICacheService, CacheService>();
_services.AddScoped<IIdentityService, IdentityService>();
_services.AddScoped(s => s.GetService<IHttpContextAccessor>()?.HttpContext.User);
_services.AddScoped<ClaimsPrincipal>(s => s.GetService<IHttpContextAccessor>()?.HttpContext.User);
_services.AddScoped<IAircraftRepository, AircraftRepository>();
_services.AddScoped<IDropZoneRepository, DropZoneRepository>();