Beispiel #1
0
        //create this action
        public IActionResult ConfirmFollower(IndexMyShelfViewModel model)
        {
            if (ModelState.IsValid)
            {
                var followee = User.Identity.Name;

                _myShelfDataService.ConfirmFollower(model.Person.UserName, followee);
            }

            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public IActionResult Index(string userName)
        {
            var user = User.Identity.Name;

            var model = new IndexMyShelfViewModel();

            model.MyShelfBooks          = _myShelfDataService.GetUserShelf(user);
            model.PeopleIFollow         = _myShelfDataService.GetUsersIFollow(user);
            model.PendingFollowRequests = _myShelfDataService.GetPendingFollowers(user);

            return(View(model));
        }