This commit is contained in:
2025-12-01 12:04:05 +03:30
parent e644606195
commit 6a6c8ce91a
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -65,7 +65,11 @@ export class CartService {
* Find cart by user and restaurant
*/
async findOne(userId: string, restaurantId: string): Promise<Cart> {
return this.getOrCreateCart(userId, restaurantId);
const cart = await this.getCartByRestaurant(userId, restaurantId);
if (!cart) {
throw new NotFoundException('Cart not found');
}
return cart;
}
/**