feat: add proxy server

This commit is contained in:
2025-01-19 19:49:24 +01:00
parent 78e94ccf82
commit ce38b2be0a
6 changed files with 33 additions and 10 deletions

View File

@@ -44,4 +44,14 @@ const noRecipeSchema = z.object({
export const recipeResponseSchema = z.union([recipeSchema, noRecipeSchema]);
export function isValidRecipe(
recipe:
| { ingredients?: unknown[]; instructions?: string[]; name?: string }
| null
| undefined,
) {
return recipe?.ingredients?.length && recipe?.instructions?.length &&
recipe.name?.length;
}
export default recipeSchema;