public async Task <ActionResult> GetInfoFromToken([FromQuery] string token)
        {
            var userId = _jwtService.GetUserIdFromEmailToken(token);
            var mentor = await _mentorRepository.GetMentorById(userId);

            if (mentor == null)
            {
                return(NotFound("Cannot find mentor"));
            }

            return(Ok(mentor));
        }
Пример #2
0
 public Mentor Get(int id)
 {
     return(_repository.GetMentorById(id));
 }