Exemplo n.º 1
0
        public JsonResult LikePost(int postID, int postOwnerID)
        {
            int userID = 0;

            userID = (int)Session["CurrentUserID"];
            bool returnValue = false;

            if (postID != 0 && userID != 0 && postOwnerID != 0)
            {
                returnValue = likeManager.LikePost(new LIKE()
                {
                    POST_ID = postID, LIKE_BY = userID
                }, postOwnerID);
            }
            return(Json(new { Status = returnValue }, JsonRequestBehavior.AllowGet));
        }