nesh170 / asap-inventory-system

This is a concept inventory system for ECE458. It is built by ASAPsolutions
1 stars 0 forks source link

Adding log instances items #113

Closed nesh170 closed 7 years ago

nesh170 commented 7 years ago
  1. Log Acquisition of Items POST /api/item/quantity HTTP/1.1 Host: localhost:8000 Content-Type: application/json Authorization: Bearer

The quantity value is the amount of items gained or loss (in negative). Not the new Item Quantity Item.quantity = Item.quantity + quantity

Request:

    {
      "item_id": 6,
      "quantity": 5,
      "comment": "They gave it to us for fwee"
    }

Response:

{
  "id": 6,
  "name": "Fire Phone",
  "quantity": 10,
  "model_number": null,
  "description": null,
  "tags": []
}

Now staff is not able to add the quantities