public async Task <ActionResult <Stats> > GetUserStats() { try { var userId = int.Parse(User.FindFirst(ClaimTypes.Sid)?.Value); var stats = await _statsService.GetByUserIdAsync(userId); var result = _mapper.Map <Stats>(stats); return(Ok(result)); } catch (Exception ex) { return(StatusCode((int)HttpStatusCode.InternalServerError, ex.Message + " " + ex.StackTrace)); } }