Skip to content

Commit

Permalink
Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
David-TP committed Oct 11, 2024
1 parent 310fa65 commit 7b6a633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shoppingCart/shoppingCartController.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ const AddToCart = async (req, res) => {

// Intentar encontrar un carrito activo del usuario
let shoppingCart = await ShoppingCart.findOne({
where: { UserID, CartStateID: 1 } // Estado activo
where: { UserID, CartStatusID: 1 } // Estado activo
});

if (!shoppingCart) {
// Si no existe un carrito activo, crear uno nuevo
shoppingCart = await ShoppingCart.create({
UserID,
CartStateID: 1, // Estado activo
CartStatusID: 1, // Estado activo
});
}

Expand Down

0 comments on commit 7b6a633

Please sign in to comment.