For example, this commit lets the user add 12 eggs to the pantry at
once.
Specifically, this commit adds a "quantity" field to the "Add product
to pantry" dialog, with a maximum value of 25.
Then, it makes one POST request to the pantry for each copy of the item.
These requests are executed in parallel, insofar as the browser permits.
Notes:
The POST requests are all executed in parallel, insofar as the browser
permits.
On the one hand, making so many POST requests is inefficient
in terms of network usage; but on the other hand, it was
significantly easier to implement than changing the REST API to
allow batch-adding of pantry items.
For example, this commit lets the user add 12 eggs to the pantry at once.
Specifically, this commit adds a "quantity" field to the "Add product to pantry" dialog, with a maximum value of 25.
Then, it makes one POST request to the pantry for each copy of the item. These requests are executed in parallel, insofar as the browser permits.
Notes:
Closes #34
https://user-images.githubusercontent.com/56209343/177396313-a43c1052-f8ac-4ac4-ae9e-247bdb8a235f.mov