Update GetUserQueryHandler.cs
This commit is contained in:
@@ -17,6 +17,14 @@ public class GetUserQueryHandler : IRequestHandler<GetUserQuery, GetUserResponse
|
|||||||
{
|
{
|
||||||
Id = long.Parse(userId)
|
Id = long.Parse(userId)
|
||||||
}, cancellationToken: cancellationToken);
|
}, cancellationToken: cancellationToken);
|
||||||
return response.Adapt<GetUserResponseDto>();
|
var result = response.Adapt<GetUserResponseDto>();
|
||||||
|
var getJwtToken = await _context.User.GetJwtTokenAsync(request: new()
|
||||||
|
{
|
||||||
|
Id = long.Parse(userId)
|
||||||
|
}, cancellationToken: cancellationToken);
|
||||||
|
if(getJwtToken != null && !string.IsNullOrWhiteSpace(getJwtToken.Token))
|
||||||
|
result.Token = getJwtToken.Token;
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user