feat: add proxy server
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user