0
0
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:
alex289 2023-10-23 12:40:53 +02:00
parent 7253a14bec
commit 7e36fb7dd2
No known key found for this signature in database
GPG Key ID: 573F77CD2D87F863
3 changed files with 3 additions and 4 deletions

View File

@ -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))

View File

@ -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)
{

View File

@ -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;