public async Task <IActionResult> DeleteBookFromWishList([FromRoute] int bookId) { string WishListData; try { string userId = null; userId = User.FindFirst("userId").Value; if (userId == null) { return(this.Ok(new ResponseEntity(HttpStatusCode.OK, "Invalid Token", userId, ""))); } WishListData = await Task.FromResult(WishListService.DeleteBookFromWishList(bookId, userId)); if (!WishListData.Contains("Not") && WishListData != null) { return(this.Ok(new ResponseEntity(HttpStatusCode.OK, WishListData, bookId, ""))); } } catch { return(this.BadRequest(new ResponseEntity(HttpStatusCode.BadRequest, "Bad Request", null, ""))); } return(this.Ok(new ResponseEntity(HttpStatusCode.NoContent, WishListData, null, ""))); }
public List <string> transferItemFromWishList(int id, int bookId, string wishListNameOrigin, string wishListNameDestination) { WishListData data = new WishListData(); return(data.transferItemFromWishList(id, bookId, wishListNameOrigin, wishListNameDestination)); }
public List <string> deleteUserWishList(int id, string wishListName) { WishListData data = new WishListData(); return(data.deleteUserWishList(id, wishListName)); }
public List <WishlistModel> getUserWishList(int UserId) { WishListData data = new WishListData(); return(data.getUserWishList(UserId)); }
public List <WishlistBookModel> getWishListBooks(int UserId, string wishListName) { WishListData data = new WishListData(); return(data.getWishListBooks(UserId, wishListName)); }
public List <string> removeItemFromWishList(int id, int bookId, string wishListName) { WishListData data = new WishListData(); return(data.removeItemFromWishList(id, bookId, wishListName)); }
public List <string> addItemToWishList(int id, int bookId, string wishListName) { WishListData data = new WishListData(); return(data.addItemToWishList(id, bookId, wishListName)); }
public List <string> createWishList(int id, string wishListName) { WishListData data = new WishListData(); return(data.createWishList(id, wishListName)); }