expose workshop metric
This commit is contained in:
@@ -116,6 +116,7 @@ export class RefundTicketSchema extends PothosSchema {
|
||||
let refundAmount = 0
|
||||
if (diffDays < 24) refundAmount = order.total
|
||||
else if (diffDays < 48) refundAmount = order.total * 0.5
|
||||
if (refundAmount === 0) throw new Error('Cannot refund after 72 hours')
|
||||
// create refund ticket
|
||||
const refundTicket = await this.prisma.refundTicket.create({
|
||||
data: {
|
||||
|
||||
Reference in New Issue
Block a user