Skip to content

Commit ef28aa1

Browse files
committed
Update suprabase env var import
1 parent 4d20bb9 commit ef28aa1

1 file changed

Lines changed: 3 additions & 16 deletions

File tree

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
11
import { createClient } from '@supabase/supabase-js'
2-
3-
const supabaseUrl = import.meta.env['SUPABASE_URL']!
4-
5-
// Admin client (server-side only, bypasses RLS)
6-
export const supabaseAdmin = createClient(
7-
supabaseUrl,
8-
import.meta.env['SUPABASE_SERVICE_ROLE_KEY']!,
9-
{
10-
auth: {
11-
autoRefreshToken: false,
12-
persistSession: false
13-
}
14-
}
15-
)
2+
import { SUPABASE_KEY, SUPABASE_URL} from 'astro:env/client'
163

174
// Public client (client-side, respects RLS)
185
export const supabasePublic = createClient(
19-
supabaseUrl,
20-
import.meta.env['SUPABASE_KEY']!
6+
SUPABASE_URL,
7+
SUPABASE_KEY
218
)

0 commit comments

Comments
 (0)