Aggiornamento modifiche preOrdini
This commit is contained in:
@@ -30,14 +30,15 @@ const OrdersCart = require('../models/orderscart');
|
||||
router.get('/:userId', authenticate, function (req, res, next) {
|
||||
let userId = req.body.userId
|
||||
let idapp = req.body.idapp
|
||||
OrdersCart.getOrdersCartByUserId(userId, idapp, 0, function (err, cart) {
|
||||
if (err) return next(err)
|
||||
OrdersCart.getOrdersCartByUserId(userId, idapp, 0, false)
|
||||
.then((cart) => {
|
||||
|
||||
if (cart)
|
||||
res.send({ code: server_constants.RIS_CODE_OK, cart });
|
||||
else
|
||||
res.status(400).send(e);
|
||||
})
|
||||
|
||||
if (cart)
|
||||
res.send({ code: server_constants.RIS_CODE_OK, cart });
|
||||
else
|
||||
res.status(400).send(e);
|
||||
})
|
||||
})
|
||||
|
||||
module.exports = router;
|
||||
|
||||
Reference in New Issue
Block a user