fix: align placeholder handling for all hotel images in zod
This commit is contained in:
@@ -3,6 +3,8 @@ import { z } from "zod"
|
||||
import { countriesMap } from "@/components/TempDesignSystem/Form/Country/countries"
|
||||
import { getMembership } from "@/utils/user"
|
||||
|
||||
import { imageSchema } from "../hotels/schemas/image"
|
||||
|
||||
export const membershipSchema = z.object({
|
||||
currentPoints: z.number(),
|
||||
expirationDate: z.string(),
|
||||
@@ -60,20 +62,7 @@ export const getStaysSchema = z.object({
|
||||
hotelOperaId: z.string(),
|
||||
hotelInformation: z.object({
|
||||
hotelContent: z.object({
|
||||
images: z.object({
|
||||
metaData: z.object({
|
||||
title: z.string(),
|
||||
altText: z.string(),
|
||||
altText_En: z.string(),
|
||||
copyRight: z.string(),
|
||||
}),
|
||||
imageSizes: z.object({
|
||||
tiny: z.string(),
|
||||
small: z.string(),
|
||||
medium: z.string(),
|
||||
large: z.string(),
|
||||
}),
|
||||
}),
|
||||
images: imageSchema,
|
||||
}),
|
||||
hotelName: z.string(),
|
||||
cityName: z.string().nullable(),
|
||||
@@ -140,20 +129,7 @@ export const getFriendTransactionsSchema = z.object({
|
||||
city: z.string().default(""),
|
||||
name: z.string().default(""),
|
||||
hotelContent: z.object({
|
||||
images: z.object({
|
||||
metaData: z.object({
|
||||
title: z.string(),
|
||||
altText: z.string(),
|
||||
altText_En: z.string(),
|
||||
copyRight: z.string(),
|
||||
}),
|
||||
imageSizes: z.object({
|
||||
tiny: z.string(),
|
||||
small: z.string(),
|
||||
medium: z.string(),
|
||||
large: z.string(),
|
||||
}),
|
||||
}),
|
||||
images: imageSchema,
|
||||
}),
|
||||
})
|
||||
.optional(),
|
||||
|
||||
Reference in New Issue
Block a user