expose workshop metric

This commit is contained in:
2024-11-26 18:07:03 +07:00
parent 1062f5944d
commit e63f900cf4
3 changed files with 15 additions and 2 deletions

View File

@@ -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: {