public async Task <IActionResult> GetUserByUserName(string userName) { var user = await _userService.GetUserByUserName(userName); if (user != null) { return(Ok(UserToUserViewModelMapper.UserToUserViewModel(user))); } return(NotFound()); }
public async Task <IActionResult> Post([FromBody] IServices.Requests.CreateUser createUser) { var user = await _userService.CreateUser(createUser); return(Created(user.UserId.ToString(), UserToUserViewModelMapper.UserToUserViewModel(user))); }