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
@@ -22,7 +22,7 @@ export class CartController {
@ApiResponse({ status: 200, description: 'Cart retrieved successfully' })
@ApiResponse({ status: 404, description: 'Cart not found' })
async findOne(@UserId() userId: string, @RestId() restaurantId: string) {
return this.cartService.findOne(userId, restaurantId);
return this.cartService.getOrCreateCart(userId, restaurantId);
}
@Post('items/:foodId/increment')