up
This commit is contained in:
@@ -67,7 +67,7 @@ export class CartService {
|
|||||||
async findOne(userId: string, restaurantId: string): Promise<Cart> {
|
async findOne(userId: string, restaurantId: string): Promise<Cart> {
|
||||||
const cart = await this.getCartByRestaurant(userId, restaurantId);
|
const cart = await this.getCartByRestaurant(userId, restaurantId);
|
||||||
if (!cart) {
|
if (!cart) {
|
||||||
throw new NotFoundException('Cart not found');
|
return this.getOrCreateCart(userId, restaurantId);
|
||||||
}
|
}
|
||||||
return cart;
|
return cart;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user