diff --git a/src/modules/cart/providers/cart.service.ts b/src/modules/cart/providers/cart.service.ts index f6b92cb..ad3c160 100644 --- a/src/modules/cart/providers/cart.service.ts +++ b/src/modules/cart/providers/cart.service.ts @@ -67,7 +67,7 @@ export class CartService { async findOne(userId: string, restaurantId: string): Promise { const cart = await this.getCartByRestaurant(userId, restaurantId); if (!cart) { - throw new NotFoundException('Cart not found'); + return this.getOrCreateCart(userId, restaurantId); } return cart; }