This commit is contained in:
2025-12-01 12:00:38 +03:30
parent 4093e3863e
commit d585ad6756
+1 -1
View File
@@ -67,7 +67,7 @@ export class CartService {
async findOne(userId: string, restaurantId: string): Promise<Cart> {
const cart = await this.getCartByRestaurant(userId, restaurantId);
if (!cart) {
throw new NotFoundException('Cart not found');
return this.getOrCreateCart(userId, restaurantId);
}
return cart;
}