Beispiel #1
0
        public string AddFav(int postId)
        {
            bool success = _db.AddFav(postId, HttpContext.User.Identity.Name);

            if (success)
            {
                return("FAV ADDED!");
            }
            return("FAILED TO ADD");
        }
        public string AddFav(int id)
        {
            bool result = _db.AddFav(id, HttpContext.User.Identity.Name);

            if (result)
            {
                return("Added to Favorites!");
            }
            return("An Error Occurred! Try Again!");
        }