Wishlist (E-commerce Store (full stack))
POST /wishlist {"product"} saves a product (201 {"wishlist":[…]}, or 200 if it was already there); DELETE /wishlist/<id removes it; GET /wishlist lists {"name","price","product"} items in the order saved; POST /wishlist/<id/move moves it into the cart (qty 1, same stock rule) → 200 {"cart":…,"wishlist":…}. Not saved: 404 {"error":"not in wishlist"}.
Input: As before.
Output: As before.
Difficulty: Medium. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.
Hint
- A list of product ids per user.