diff --git a/SafeCity/Mappers/MappingActions/SetAuditDataActionCreate.cs b/SafeCity/Mappers/MappingActions/SetAuditDataActionCreate.cs index 4d669e5..a19240f 100644 --- a/SafeCity/Mappers/MappingActions/SetAuditDataActionCreate.cs +++ b/SafeCity/Mappers/MappingActions/SetAuditDataActionCreate.cs @@ -1,4 +1,5 @@ using System; +using System.IdentityModel.Tokens.Jwt; using AutoMapper; using Microsoft.AspNetCore.Http; using SafeCity.Core.Entities; @@ -19,8 +20,8 @@ public SetAuditDataActionCreate(IHttpContextAccessor httpContextAccessor) public void Process(TSource source, TDestination destination, ResolutionContext context) { - //destination.CreatedBy = _httpContextAccessor.HttpContext.User.FindFirst(JwtRegisteredClaimNames.Email).Value; - destination.CreatedBy = "chuck.norris@gmail.com"; + destination.CreatedBy = _httpContextAccessor.HttpContext.User.FindFirst(JwtRegisteredClaimNames.Email).Value; + //destination.CreatedBy = "chuck.norris@gmail.com"; destination.CreatedDate = DateTime.Now; } }