public async Task <ActionResult> MyFollows(MyFollowsViewModel model) { if (!(await Authorized())) { return(AccountLogin()); } if (model.UnfollowUserId == null) { AddError("No user was selected."); return(View(model)); } var result = await SocialManager.UnfollowUser(UserToken, model.UnfollowUserId); if (result.Success) { return(SuccessView("User Unfollowed successfully")); } else { return(ErrorView()); } }
public async Task <ActionResult> UnfollowUser(string otherUserId) { var unfollowResult = await SocialManager.UnfollowUser(UserToken, otherUserId); return(Json(unfollowResult)); }