From c20f37cdccdb215a9b770660d023d566a2721ba1 Mon Sep 17 00:00:00 2001 From: Felipe Torres Date: Mon, 2 Dec 2024 11:50:50 -0300 Subject: [PATCH] Check for requirements on agent behaviour --- src/schema/purchaseOrder/tests/createPurchaseOrder.test.ts | 1 - .../ticketAddons/helpers/createUpdateAddonMutationHelpers.ts | 5 +++-- src/schema/userTickets/mutations/claimUserTicket/index.ts | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 src/schema/purchaseOrder/tests/createPurchaseOrder.test.ts diff --git a/src/schema/purchaseOrder/tests/createPurchaseOrder.test.ts b/src/schema/purchaseOrder/tests/createPurchaseOrder.test.ts deleted file mode 100644 index 0519ecba..00000000 --- a/src/schema/purchaseOrder/tests/createPurchaseOrder.test.ts +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/schema/ticketAddons/helpers/createUpdateAddonMutationHelpers.ts b/src/schema/ticketAddons/helpers/createUpdateAddonMutationHelpers.ts index 92514f7f..460fbd99 100644 --- a/src/schema/ticketAddons/helpers/createUpdateAddonMutationHelpers.ts +++ b/src/schema/ticketAddons/helpers/createUpdateAddonMutationHelpers.ts @@ -127,8 +127,9 @@ const priceHelpers = { if (existingPrices.length > 0) { const pricesToUpdate = existingPrices.map((ep) => { - const valueInCents = prices.find((p) => p.currencyId === ep.currencyId) - ?.value_in_cents; + const valueInCents = prices.find( + (p) => p.currencyId === ep.currencyId, + )?.value_in_cents; if (!valueInCents) { throw applicationError( diff --git a/src/schema/userTickets/mutations/claimUserTicket/index.ts b/src/schema/userTickets/mutations/claimUserTicket/index.ts index 1427188f..2949dcd3 100644 --- a/src/schema/userTickets/mutations/claimUserTicket/index.ts +++ b/src/schema/userTickets/mutations/claimUserTicket/index.ts @@ -154,8 +154,6 @@ async function processTicketClaim({ const normalizedInput = normalizeTicketClaimInput(purchaseOrder, logger); - console.log("normalizedInput", normalizedInput); - // Validate ticket requirements for each ticket being claimed await Promise.all( Object.keys(normalizedInput).map(async (ticketId) => {