Merge pull request #1 from EPESS/update_orderid_into_schedule_dates
Update orderid into schedule dates
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 },
|
||||
|
||||
@@ -169,6 +169,7 @@ export class UserSchema extends PothosSchema {
|
||||
throw new Error('Not allowed')
|
||||
}
|
||||
let user = ctx.http.me as UserWithChatRooms
|
||||
|
||||
if (!user?.name) {
|
||||
throw new Error('User not found')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user