fix: Price types has changed to doubles in the API
This commit is contained in:
committed by
Michael Zetterberg
parent
8f9e268802
commit
6fb71dea1b
@@ -527,7 +527,7 @@ export const ancillaryPackagesSchema = z
|
||||
description: item.descriptions.html,
|
||||
imageUrl: item.images[0]?.imageSizes.small,
|
||||
price: {
|
||||
total: parseInt(item.variants.ancillary.price.totalPrice),
|
||||
total: item.variants.ancillary.price.totalPrice,
|
||||
currency: item.variants.ancillary.price.currency,
|
||||
},
|
||||
points: item.variants.ancillaryLoyalty?.points,
|
||||
|
||||
@@ -9,14 +9,14 @@ import { PackageTypeEnum } from "@/types/enums/packages"
|
||||
export const packagePriceSchema = z
|
||||
.object({
|
||||
currency: z.string().default("N/A"),
|
||||
price: z.string(),
|
||||
totalPrice: z.string(),
|
||||
price: z.number(),
|
||||
totalPrice: z.number(),
|
||||
})
|
||||
.optional()
|
||||
.default({
|
||||
currency: "N/A",
|
||||
price: "0",
|
||||
totalPrice: "0",
|
||||
price: 0,
|
||||
totalPrice: 0,
|
||||
})
|
||||
|
||||
const inventorySchema = z.object({
|
||||
|
||||
Reference in New Issue
Block a user