refactor(helcim): normalize listHelcimCustomerCards return shape
This commit is contained in:
parent
27e73e969a
commit
134aef6ab0
6 changed files with 58 additions and 33 deletions
|
|
@ -13,7 +13,7 @@ export default defineEventHandler(async (event) => {
|
|||
const cards = await listHelcimCustomerCards(body.customerId)
|
||||
|
||||
// Verify the card token exists for this customer
|
||||
const cardExists = Array.isArray(cards) && cards.some(card =>
|
||||
const cardExists = cards.some(card =>
|
||||
card.cardToken === body.cardToken
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue