예제 #1
0
        public async Task <IActionResult> getFollowUsers()
        {
            var followUsers = await _repo.GetFollowUsers(int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value));

            var follow = new List <FollowUserToGetListDto>();

            var mappedFollowUser = _mapper.Map(followUsers, follow);

            foreach (var user in mappedFollowUser)
            {
                var getUserDetails = await _repo.GetFollowUsersDetails(user.FollowerId);

                user.Username = getUserDetails.UserName;
                user.UrlPhoto = getUserDetails.PhotoUrl;
                user.PublicId = getUserDetails.PublicId;
            }



            return(Ok(mappedFollowUser));
        }