feat(SW-70): Create TRPC route to get rates

This commit is contained in:
Niclas Edenvin
2024-07-09 13:23:59 +02:00
parent 78c1452ed3
commit 722bab97ad
6 changed files with 106 additions and 87 deletions

View File

@@ -391,3 +391,17 @@ export const getHotelDataSchema = z.object({
// - Example "included" data available in our tempHotelData file.
// included: z.any(),
})
const Rate = z.object({
id: z.number(),
name: z.string(),
description: z.string(),
size: z.string(),
pricePerNight: z.number(),
currency: z.string(),
imageSrc: z.string(),
})
export const getRatesSchema = z.array(Rate)
export type Rate = z.infer<typeof Rate>