The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Refactor to handle multiple sites
Isaiah Hamilton41a1d98cc25c
diff --git a/supabase/functions/og-images/handler.tsx b/supabase/functions/og-images/handler.tsxindex 85dfc4cd6e2..642bc6a94c3 100644--- a/supabase/functions/og-images/handler.tsx+++ b/supabase/functions/og-images/handler.tsx@@ -34,12 +34,16 @@ export async function handler(req: Request) {})}- if (site === 'docs') {- return new ImageResponse(( <Docs title={title} description={description} type={type} icon={icon} /> ), { ...options })+ switch (site) {+ case 'docs':+ return new ImageResponse(( <Docs title={title} description={description} type={type} icon={icon} /> ), { ...options })+ break;++ default:+ return new Response(JSON.stringify({message: 'site not found'}), {+ headers: { ...corsHeaders },+ status: 404,+ })+ break;}-- return new Response(JSON.stringify({error: 'Internal server error'}), {- headers: { ...corsHeaders },- status: 500- })}