[READ-ONLY] Mirror of https://github.com/danielroe/roe.dev. This is the code and content for my personal website, built in Nuxt. roe.dev
0

Configure Feed

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

fix: use non-cdn client for webhook processing

+8 -2
+6
nuxt.config.ts
··· 309 309 sanity: { 310 310 apiVersion: '2025-02-19', 311 311 perspective: 'published', 312 + additionalClients: { 313 + // non-CDN client for server-side writes and webhook processing 314 + write: { 315 + useCdn: false, 316 + }, 317 + }, 312 318 }, 313 319 314 320 scripts: {
+2 -2
server/api/publish-ama.post.ts
··· 136 136 return { success: false, message: 'Invalid payload or not ready to publish' } 137 137 } 138 138 139 - const sanity = useSanity(event) 139 + const sanity = useSanity(event, 'write') 140 140 141 141 try { 142 142 const document = await sanity.client.fetch<AMADocument>( ··· 668 668 console.warn('YouTube Shorts: dereferenced video url missing, falling back to asset lookup', { 669 669 ref: videoAsset.asset?._ref, 670 670 }) 671 - const sanity = useSanity(event) 671 + const sanity = useSanity(event, 'write') 672 672 const videoData = await sanity.client.fetch<{ url?: string } | null>( 673 673 '*[_id == $id][0]{ url }', 674 674 { id: videoAsset.asset._ref },