This commit is contained in:
2025-12-06 09:02:03 +03:30
parent 683406a396
commit 83829856ad
4 changed files with 17 additions and 18 deletions
+3 -3
View File
@@ -37,7 +37,7 @@ export class OrdersService {
throw new BadRequestException('Payment method is required for checkout');
}
const { paymentUrl } = await this.paymentsService.initializePayment(order.paymentMethod.id, order.total, order.id);
const { paymentUrl } = await this.paymentsService.startPayment(order.id);
await this.cartService.clearCart(userId, restaurantId);
@@ -234,10 +234,10 @@ export class OrdersService {
};
}
async findAll() {
async findAll(restId: string) {
const orders = await this.em.find(
Order,
{},
{ restaurant: { id: restId } },
{ populate: ['user', 'restaurant', 'deliveryMethod', 'address', 'paymentMethod'] },
);
if (!orders) {