MCPcopy Create free account
hub / github.com/dhatGuy/PERN-Store / decreaseItemQuantity

Function decreaseItemQuantity

server/controllers/cart.controller.js:38–44  ·  view source on GitHub ↗
(req, res)

Source from the content-addressed store, hash-verified

36
37// decrement item quantity by 1
38const decreaseItemQuantity = async (req, res) => {
39 const { product_id } = req.body;
40 const cart_id = req.user.cart_id;
41
42 const cart = await cartService.decreaseQuantity({ cart_id, product_id });
43 res.json(cart);
44};
45
46module.exports = {
47 getCart,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected