public async Task <IActionResult> GetBestPractice(int userId, int id) { var creator = await _userRepo.GetUser(userId); if (creator.Id != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value)) { return(Unauthorized()); } var bestPracticeFromRepo = _repo.GetBestPractice(id); BestPracticeForReturnDto bestPracticeForReturn = _mapper.Map <BestPracticeForReturnDto>(bestPracticeFromRepo); return(Ok(bestPracticeForReturn)); }