public HttpResponseMessage Unfollow(string profileId) { SuccessResponse response = new SuccessResponse(); string userId = _userService.GetCurrentUserId(); _followerSevice.Unfollow(userId, profileId); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
public async Task <IActionResult> Unfollow(int?id) { var user = await _userManager.GetUserAsync(User); if (!await _followerService.Unfollow(user, id)) { return(BadRequest()); } return(Json(new { })); }
public IActionResult Remove(string followedUserId) { followers.Unfollow(User.Identity.Name, followedUserId); return(RedirectToAction("Index", "User", new { id = followedUserId })); }