detail
This commit is contained in:
@@ -252,8 +252,15 @@ export class OrdersService {
|
||||
});
|
||||
}
|
||||
|
||||
findOne(id: number) {
|
||||
return `This action returns a #${id} order`;
|
||||
async findOne(id: string): Promise<Order> {
|
||||
const order = await this.orderRepository.findOne(
|
||||
{ id },
|
||||
{ populate: ['user', 'restaurant', 'deliveryMethod', 'address', 'paymentMethod', 'items', 'items.food'] },
|
||||
);
|
||||
if (!order) {
|
||||
throw new NotFoundException('Order not found');
|
||||
}
|
||||
return order;
|
||||
}
|
||||
|
||||
async acceptOrder(orderId: string) {
|
||||
|
||||
Reference in New Issue
Block a user