public ActionResult Like(string id, string actn) { Likes lk = new Likes(); actn = actn.ToLower(); string result = string.Empty; if (actn == "like") { var s = lk.LikeMedia(id, HttpContext.User.Identity.Name); if (s.meta.code == "200") { result = "liked"; } } else if (actn == "unlike") { var s = lk.UnlikeMedia(id, HttpContext.User.Identity.Name); if (s.meta.code == "200") { result = "unliked"; } } return(Content(result)); }