From a0270b00de6d0b0732a0abf5884906b59b78d076 Mon Sep 17 00:00:00 2001 From: masoodafar-web Date: Fri, 14 Nov 2025 03:24:16 +0330 Subject: [PATCH] Include UserRoles and Role in GetJwtTokenQueryHandler for enhanced user data retrieval --- .../UserCQ/Queries/GetJwtToken/GetJwtTokenQueryHandler.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CMSMicroservice.Application/UserCQ/Queries/GetJwtToken/GetJwtTokenQueryHandler.cs b/src/CMSMicroservice.Application/UserCQ/Queries/GetJwtToken/GetJwtTokenQueryHandler.cs index dd97e5c..7653f4e 100644 --- a/src/CMSMicroservice.Application/UserCQ/Queries/GetJwtToken/GetJwtTokenQueryHandler.cs +++ b/src/CMSMicroservice.Application/UserCQ/Queries/GetJwtToken/GetJwtTokenQueryHandler.cs @@ -13,6 +13,8 @@ public class GetJwtTokenQueryHandler : IRequestHandler Handle(GetJwtTokenQuery request, CancellationToken cancellationToken) { var user = await _context.Users + .Include(u => u.UserRoles) + .ThenInclude(ur => ur.Role) .FirstOrDefaultAsync(x => x.Id == request.Id, cancellationToken) ?? throw new NotFoundException(nameof(User), request.Id); return new GetJwtTokenResponseDto() {