This commit is contained in:
@@ -111,7 +111,7 @@ export class PaymentsService {
|
||||
await this.em.transactional(async em => {
|
||||
const order = await em.findOne(Order, { id: ctx.order.id }, { populate: ['user', 'restaurant'] });
|
||||
if (!order) throw new NotFoundException(OrderMessage.NOT_FOUND);
|
||||
|
||||
if (!order.user) throw new NotFoundException(OrderMessage.USER_NOT_FOUND);
|
||||
if (order.status === OrderStatus.PAID) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user