fix: handle empty stays in query

This commit is contained in:
Christel Westerberg
2024-05-13 09:46:14 +02:00
parent 058f0cc898
commit a91ff342f0
5 changed files with 30 additions and 199 deletions
+10 -8
View File
@@ -78,14 +78,16 @@ export const getStaysSchema = z.object({
}),
})
),
links: z.object({
self: z.string(),
offset: z.number(),
limit: z.number(),
totalCount: z.number(),
}),
links: z
.object({
self: z.string(),
offset: z.number(),
limit: z.number(),
totalCount: z.number(),
})
.nullable(),
})
type GetStaysData = z.infer<typeof getStaysSchema>
export type GetStaysData = z.infer<typeof getStaysSchema>
export type Stay = GetStaysData["data"][number]
export type Stay = GetStaysData["data"][0]