public JsonResult RemoveAjax(string setId) { var user = HttpContext.User as CustomPrincipal; try { wishlistService.RemoveSetFromWishlistForUser(user.Id, int.Parse(setId), 1); return(Json(new { success = true }, JsonRequestBehavior.AllowGet)); } catch (Exception e) { return(Json(new { error = true, message = e.Message }, JsonRequestBehavior.AllowGet)); } }
public HttpResponseMessage RemoveSetFromWishlistForUser(WishlistApi newWishlistItems) { wishlistService.RemoveSetFromWishlistForUser(newWishlistItems.UserId, newWishlistItems.LSetId, newWishlistItems.Number); return(Request.CreateResponse(HttpStatusCode.Created, "Item removed from wishlist")); }