public HttpResponseMessage Unfollow(string profileId)
        {
            SuccessResponse response = new SuccessResponse();
            string          userId   = _userService.GetCurrentUserId();

            _followerSevice.Unfollow(userId, profileId);

            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }
예제 #2
0
        public async Task <IActionResult> Unfollow(int?id)
        {
            var user = await _userManager.GetUserAsync(User);

            if (!await _followerService.Unfollow(user, id))
            {
                return(BadRequest());
            }

            return(Json(new { }));
        }
예제 #3
0
 public IActionResult Remove(string followedUserId)
 {
     followers.Unfollow(User.Identity.Name, followedUserId);
     return(RedirectToAction("Index", "User", new { id = followedUserId }));
 }