This commit is contained in:
2025-12-01 12:01:10 +03:30
parent d585ad6756
commit e644606195
@@ -65,12 +65,8 @@ export class CartService {
* Find cart by user and restaurant
*/
async findOne(userId: string, restaurantId: string): Promise<Cart> {
const cart = await this.getCartByRestaurant(userId, restaurantId);
if (!cart) {
return this.getOrCreateCart(userId, restaurantId);
}
return cart;
}
/**
* Add item to cart (increment quantity if item exists, otherwise create new)