fix chore
This commit is contained in:
@@ -3,8 +3,8 @@ using Atomx.Admin.Client.Models;
|
||||
using Atomx.Admin.Client.Validators;
|
||||
using Atomx.Admin.Services;
|
||||
using Atomx.Admin.Utils;
|
||||
using Atomx.Common.Constants;
|
||||
using Atomx.Common.Models;
|
||||
using Atomx.Common.Utils;
|
||||
using Atomx.Data;
|
||||
using Atomx.Data.CacheServices;
|
||||
using Atomx.Data.Services;
|
||||
@@ -28,7 +28,7 @@ namespace Atomx.Admin.Controllers
|
||||
public class SignController : ControllerBase
|
||||
{
|
||||
readonly ILogger<SignController> _logger;
|
||||
readonly IdentityService _identityService;
|
||||
readonly IIdentityService _identityService;
|
||||
readonly IIdCreatorService _idCreator;
|
||||
readonly IMapper _mapper;
|
||||
readonly DataContext _dbContext;
|
||||
@@ -36,7 +36,7 @@ namespace Atomx.Admin.Controllers
|
||||
readonly ICacheService _cacheService;
|
||||
readonly AuthenticationStateProvider _authenticationStateProvider;
|
||||
|
||||
public SignController(ILogger<SignController> logger, IdentityService identityService, IIdCreatorService idCreator, IMapper mapper, DataContext dbContext, JwtSetting jwtSetting, ICacheService cacheService, AuthenticationStateProvider authenticationStateProvider)
|
||||
public SignController(ILogger<SignController> logger, IIdentityService identityService, IIdCreatorService idCreator, IMapper mapper, DataContext dbContext, JwtSetting jwtSetting, ICacheService cacheService, AuthenticationStateProvider authenticationStateProvider)
|
||||
{
|
||||
_logger = logger;
|
||||
_identityService = identityService;
|
||||
@@ -126,8 +126,9 @@ namespace Atomx.Admin.Controllers
|
||||
user.LastLogin = DateTime.UtcNow;
|
||||
user.LastIp = _identityService.GetClientIp();
|
||||
user.LoginCount++;
|
||||
_dbContext.Admins.Update(user);
|
||||
_dbContext.SaveChanges();
|
||||
|
||||
//((PersistingRevalidatingAuthenticationStateProvider) _authenticationStateProvider).
|
||||
|
||||
await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(claimsIdentity));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user