@@ -11,7 +11,6 @@ import {
1111 userTicketTransfersSchema ,
1212 userTicketsSchema ,
1313 SelectUserTicketSchema ,
14- UserTicketApprovalStatus ,
1514 AddonConstraintType ,
1615 InsertUserTicketAddonClaimSchema ,
1716 UserTicketAddonRedemptionStatus ,
@@ -36,6 +35,7 @@ import {
3635 TicketClaimInput ,
3736 TicketClaimInputType ,
3837} from "./refs" ;
38+ import { RESERVED_USER_TICKET_APPROVAL_STATUSES } from "../../constants" ;
3939import { assertCanStartTicketClaimingForEvent } from "../../helpers" ;
4040
4141// Types
@@ -518,16 +518,6 @@ async function verifyFinalUserTicketCounts(
518518 USER : NonNullable < Context [ "USER" ] > ,
519519 logger : Logger ,
520520) {
521- const validApprovalStatuses : UserTicketApprovalStatus [ ] = [
522- "approved" ,
523- "pending" ,
524- "not_required" ,
525- "gifted" ,
526- "gift_accepted" ,
527- "transfer_pending" ,
528- "transfer_accepted" ,
529- ] ;
530-
531521 // Bulk query for existing ticket counts
532522 const ticketCountsPromise = DB . query . userTicketsSchema
533523 . findMany ( {
@@ -537,7 +527,10 @@ async function verifyFinalUserTicketCounts(
537527 userTicketsSchema . ticketTemplateId ,
538528 ticketInfo . tickets . map ( ( t ) => t . id ) ,
539529 ) ,
540- ops . inArray ( userTicketsSchema . approvalStatus , validApprovalStatuses ) ,
530+ ops . inArray (
531+ userTicketsSchema . approvalStatus ,
532+ RESERVED_USER_TICKET_APPROVAL_STATUSES ,
533+ ) ,
541534 ) ;
542535 } ,
543536 columns : {
0 commit comments