Ejemplo n.º 1
0
        /// <summary>
        /// Method that will accept an user friend request
        /// </summary>
        /// <param name="friend">the friend username</param>
        /// <returns></returns>
        public async Task <ActionResult> AcceptRequest(string friend)
        {
            string userID = User.Identity.GetUserId();

            if (userID != null)
            {
                ApplicationUser user = db.Users.Find(userID);

                await Services.AcceptResponseFriendRequest(user.UserName, friend);
            }

            return(RedirectToAction("Notification"));
        }