Exemplo n.º 1
0
        public async Task <ActionResult <ControllerResponse <GetRank> > > getUserCurrent()
        {
            _logger.LogInformation("In GET user rank");
            string userId = _httpContextAccessor.HttpContext.User.FindFirstValue(ClaimTypes.NameIdentifier).ToString();
            var    rank   = await _rankService.getCurrentByUserIdAsync(userId);

            return(Ok(new ControllerResponse <GetRank>
            {
                data = _mapper.Map <GetRank>(rank)
            }));
        }