Exemplo n.º 1
0
        public IActionResult GetUserRanking([FromRoute] string userId)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var rankings = _rankingManager.GetAroundUserRanking(userId);

            if (rankings == null)
            {
                return(NotFound());
            }

            var result = _mapper.Map <IList <RankingViewModel> >(rankings);

            return(Ok(result));
        }