()
| 71 | |
| 72 | // For API routes - simple client without cookie handling |
| 73 | export function createSupabaseApiClient() { |
| 74 | const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL |
| 75 | const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY |
| 76 | |
| 77 | if (!supabaseUrl || !supabaseAnonKey) { |
| 78 | throw new Error( |
| 79 | 'Missing Supabase environment variables. Please set NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY.' |
| 80 | ) |
| 81 | } |
| 82 | |
| 83 | return createClient<Database>( |
| 84 | supabaseUrl, |
| 85 | supabaseAnonKey |
| 86 | ) |
| 87 | } |
nothing calls this directly
no test coverage detected