[READ-ONLY] Mirror of https://github.com/danielroe/web-dev-challenge. quickrecipes.co
0

Configure Feed

Select the types of activity you want to include in your feed.

chore: lengthen stale time

+14 -2
+14 -2
server/routes/recipe.get.ts
··· 28 28 } as const 29 29 30 30 type Response = { 31 - [key in keyof typeof responseSchema['properties']]: typeof responseSchema['properties'][key]['type'] extends 'string' ? 'enum' extends keyof typeof responseSchema['properties'][key] ? typeof responseSchema['properties'][key]['enum'] extends Array<infer S> ? S : string : string : typeof responseSchema['properties'][key]['type'] extends 'boolean' ? boolean : unknown 31 + longTitle: string 32 + shortTitle: string 33 + description: string 34 + slides: { 35 + title: string 36 + description: string 37 + text: string 38 + image?: { 39 + src: string 40 + width: number 41 + height: number 42 + } 43 + }[] 32 44 } 33 45 34 46 export default defineLazyEventHandler(async () => { ··· 77 89 console.error(e, { text: text }) 78 90 return await $fetch('/recipe' as string) as unknown 79 91 } 80 - }, { swr: true, shouldBypassCache: () => !!import.meta.dev }) 92 + }, { swr: true, staleMaxAge: 86400, maxAge: 86400, shouldBypassCache: () => !!import.meta.dev }) 81 93 })