Closed samsheps closed 1 month ago
Imported/employed the LineItemSerializer; changed the response body to show a successful creation as client was expecting a response
If this PR contains code that defines a new request/response, or changes an existing one, please put the JSON representations here.
Request
POST /cart: adds a new product to the existing user's open cart
/cart
{ "product_id": 88 }
Response
HTTP/1.1 201 Created
{ "id": 12, "product": { "id": 88, "name": "Golf", "price": 653.59, "number_sold": 0, "description": "1994 Volkswagen", "quantity": 4, "created_date": "2019-07-10", "location": "Moscow", "image_path": "/media/products/vehicle.png", "average_rating": 0 } }
Changes
Imported/employed the LineItemSerializer; changed the response body to show a successful creation as client was expecting a response
Requests / Responses
If this PR contains code that defines a new request/response, or changes an existing one, please put the JSON representations here.
Request
POST
/cart
: adds a new product to the existing user's open cartResponse
HTTP/1.1 201 Created
Testing
Related Issues