Feat/SW-1519 remove deprecated hotel data from schema
* feat(SW-1519): Removed displayWebpage from hotel schema * feat(SW-1519): Removed gallery from hotel schema * feat(SW-1519): Removed conferencesAndMeetings from hotel schema * feat(SW-1519): Removed healthAndWellness from hotel schema * feat(SW-1519): Removed restaurantImages from hotel schema * feat(SW-1519): Removed restaurantsOverviewPage from hotel schema Approved-by: Fredrik Thorsson Approved-by: Matilda Landström
This commit is contained in:
@@ -6,6 +6,7 @@ import { hotelreservation } from "@/constants/routes/hotelReservation"
|
||||
import { env } from "@/env/server"
|
||||
|
||||
import { attributesSchema as hotelAttributesSchema } from "../../hotels/schemas/hotel"
|
||||
import { additionalDataAttributesSchema } from "../../hotels/schemas/hotel/include/additionalData"
|
||||
import { tempImageVaultAssetSchema } from "../schemas/imageVault"
|
||||
import { systemSchema } from "../schemas/system"
|
||||
import { getDescription, getImage, getTitle } from "./utils"
|
||||
@@ -96,7 +97,11 @@ export const rawMetadataSchema = z.object({
|
||||
blocks: metaDataBlocksSchema,
|
||||
hotel_page_id: z.string().optional().nullable(),
|
||||
hotelData: hotelAttributesSchema
|
||||
.pick({ name: true, address: true, hotelContent: true, gallery: true })
|
||||
.pick({ name: true, address: true, hotelContent: true })
|
||||
.optional()
|
||||
.nullable(),
|
||||
additionalHotelData: additionalDataAttributesSchema
|
||||
.pick({ gallery: true })
|
||||
.optional()
|
||||
.nullable(),
|
||||
location: z.string().optional().nullable(),
|
||||
|
||||
Reference in New Issue
Block a user