Merged in fix/previous-data-throwing (pull request #200)
Fix: missing previous data throwing error Approved-by: Michael Zetterberg
This commit is contained in:
@@ -13,7 +13,7 @@ export default function ShowMoreButton({
|
||||
<Button
|
||||
disabled={disabled}
|
||||
intent="primary"
|
||||
theme="secondaryDark"
|
||||
theme="primaryDark"
|
||||
type="button"
|
||||
onClick={loadMoreData}
|
||||
>
|
||||
|
||||
@@ -9,7 +9,7 @@ export const getUserSchema = z.object({
|
||||
streetAddress: z.string().optional(),
|
||||
zipCode: z.string(),
|
||||
}),
|
||||
dateOfBirth: z.string(),
|
||||
dateOfBirth: z.string().optional().default("N/A"),
|
||||
email: z.string().email(),
|
||||
firstName: z.string(),
|
||||
language: z.string(),
|
||||
|
||||
@@ -107,10 +107,6 @@ export const userQueryRouter = router({
|
||||
}
|
||||
|
||||
const apiJson = await apiResponse.json()
|
||||
if (!apiJson.data?.length) {
|
||||
throw notFound(apiJson)
|
||||
}
|
||||
|
||||
const verifiedData = getStaysSchema.safeParse(apiJson)
|
||||
if (!verifiedData.success) {
|
||||
throw internalServerError(verifiedData.error)
|
||||
|
||||
Reference in New Issue
Block a user