Skip to content

Commit

Permalink
Fixing iZettle with no products
Browse files Browse the repository at this point in the history
  • Loading branch information
bardsley committed Nov 26, 2024
1 parent b00a89b commit 7ac66a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/api/izettle/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function POST(request: Request) {
// console.log("payload:",payload, payload.products.map((product) => product.category))
const channel = "card-payments"

const tills = payload.products.map((product) => product?.sku) as string[]
const tills = payload?.products?.length > 0 ? payload.products.map((product) => product?.sku) as string[] : ["NOTILL"]
const notification = {
amount: payload.amount,
created: payload.created,
Expand Down

0 comments on commit 7ac66a9

Please sign in to comment.