public async Task <IEnumerable <TweetResponse> > GetTweets() { var tweets = await _tweetsRepository.GetTweets(); var tweetsDtos = tweets .Select(t => _mapper.Map <Tweet, TweetResponse>(t)); return(tweetsDtos); }
public async Task <ActionResult> Me() { string userName = _userManager.GetUserName(User); return(View(await _repository.GetTweets(userName))); }
public async Task <ActionResult> Me() { string userName = User.Identity.GetUserName(); return(View(await _repository.GetTweets(userName))); }
public async Task <Tweet[]> GetTweets(ClaimsPrincipal user) => await _tweetsRepository.GetTweets(_userManager.GetUserName(user));