fix(SW-2547): filter out cities and hotel with isPublished=false
This commit is contained in:
committed by
Michael Zetterberg
parent
e38fceb237
commit
6a2bb5ac2d
@@ -479,6 +479,7 @@ export const locationsSchema = z.object({
|
||||
.transform((data) =>
|
||||
data
|
||||
.filter((node) => !!node)
|
||||
.filter((node) => !!node.isPublished)
|
||||
.filter((node) => {
|
||||
if (node.type === "hotels") {
|
||||
if (!node.operaId) {
|
||||
|
||||
@@ -5,6 +5,7 @@ export const locationCitySchema = z.object({
|
||||
cityIdentifier: z.string().optional(),
|
||||
keyWords: z.array(z.string()).optional(),
|
||||
name: z.string().optional().default(""),
|
||||
isPublished: z.boolean().default(false),
|
||||
}),
|
||||
country: z.string().optional().default(""),
|
||||
id: z.string().optional().default(""),
|
||||
|
||||
@@ -11,6 +11,8 @@ export const locationHotelSchema = z.object({
|
||||
tiny: z.string().optional(),
|
||||
})
|
||||
.optional(),
|
||||
isActive: z.boolean(),
|
||||
isPublished: z.boolean(),
|
||||
keyWords: z.array(z.string()).optional(),
|
||||
name: z.string().optional().default(""),
|
||||
operaId: z.coerce.string().optional(),
|
||||
|
||||
Reference in New Issue
Block a user