mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-30 02:31:08 +00:00
chore: miscellaneous improvements
This commit is contained in:
parent
7253a14bec
commit
7e36fb7dd2
@ -33,7 +33,7 @@ public sealed class GetAllTenantsQueryHandler :
|
||||
var tenantsQuery = _tenantRepository
|
||||
.GetAllNoTracking()
|
||||
.IgnoreQueryFilters()
|
||||
.Include(x => x.Users)
|
||||
.Include(x => x.Users.Where(y => request.IncludeDeleted || !y.Deleted))
|
||||
.Where(x => request.IncludeDeleted || !x.Deleted);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(request.SearchTerm))
|
||||
|
@ -23,8 +23,7 @@ public sealed class GetTenantByIdQueryHandler :
|
||||
|
||||
public async Task<TenantViewModel?> Handle(GetTenantByIdQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
var tenant = await _tenantRepository
|
||||
.GetByIdAsync(request.TenantId);
|
||||
var tenant = await _tenantRepository.GetByIdAsync(request.TenantId);
|
||||
|
||||
if (tenant is null)
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ namespace CleanArchitecture.Domain.Commands.Users.LoginUser;
|
||||
public sealed class LoginUserCommandHandler : CommandHandlerBase,
|
||||
IRequestHandler<LoginUserCommand, string>
|
||||
{
|
||||
private const double _expiryDurationMinutes = 30;
|
||||
private const double _expiryDurationMinutes = 60;
|
||||
private readonly TokenSettings _tokenSettings;
|
||||
|
||||
private readonly IUserRepository _userRepository;
|
||||
|
Loading…
Reference in New Issue
Block a user