update order id
This commit is contained in:
@@ -228,6 +228,15 @@ export class OrderSchema extends PothosSchema {
|
||||
paymentCode: paymentData.paymentLinkId,
|
||||
},
|
||||
})
|
||||
|
||||
// update orderId for schedule dates
|
||||
await this.prisma.scheduleDate.updateMany({
|
||||
where: { scheduleId: args.data.schedule.connect?.id ?? '' },
|
||||
data: {
|
||||
orderId: order.id,
|
||||
},
|
||||
})
|
||||
|
||||
// refetch order
|
||||
return await this.prisma.order.findUnique({
|
||||
where: { id: order.id },
|
||||
|
||||
Reference in New Issue
Block a user