Merged in feat/SW-3688-nerbyhotels (pull request #3372)
feat(SW-3688): remove nearbyHotels prop/fetch from hotelscheme * feat(SW-3688): remove nearbyHotels prop/fetch from hotelscheme * Cleanup Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -5,7 +5,6 @@ import {
|
||||
additionalDataSchema,
|
||||
transformAdditionalData,
|
||||
} from "./include/additionalData"
|
||||
import { nearbyHotelsSchema } from "./include/nearbyHotels"
|
||||
import { restaurantsSchema } from "./include/restaurants"
|
||||
import {
|
||||
roomCategoriesSchema,
|
||||
@@ -19,7 +18,6 @@ export const includeSchema = z
|
||||
z.discriminatedUnion("type", [
|
||||
additionalDataSchema,
|
||||
citySchema,
|
||||
nearbyHotelsSchema,
|
||||
restaurantsSchema,
|
||||
roomCategoriesSchema,
|
||||
]),
|
||||
@@ -29,7 +27,6 @@ export const includeSchema = z
|
||||
case "additionalData":
|
||||
return transformAdditionalData(data)
|
||||
case "cities":
|
||||
case "hotels":
|
||||
case "restaurants":
|
||||
return {
|
||||
...data.attributes,
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { attributesSchema } from "../../hotel"
|
||||
|
||||
export const nearbyHotelsSchema = z.object({
|
||||
attributes: z.lazy(() =>
|
||||
attributesSchema.pick({
|
||||
address: true,
|
||||
cityId: true,
|
||||
cityName: true,
|
||||
detailedFacilities: true,
|
||||
hotelContent: true,
|
||||
isActive: true,
|
||||
isPublished: true,
|
||||
location: true,
|
||||
name: true,
|
||||
operaId: true,
|
||||
ratings: true,
|
||||
})
|
||||
),
|
||||
id: z.string(),
|
||||
type: z.literal("hotels"),
|
||||
})
|
||||
Reference in New Issue
Block a user