Skip to content

Commit a931065

Browse files
committed
Restore legacy supabase exports in lib/supabase/index.ts to fix Vercel build
1 parent d177212 commit a931065

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

lib/supabase/admin.ts

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,16 @@ const supabaseServiceKey = process.env.SUPABASE_SERVICE_ROLE_KEY;
88
* WARNING: Only use this in server-side code and server actions
99
* This bypasses RLS policies - use with extreme caution
1010
*/
11-
export async function createClient() {
12-
return createSupabaseClient(
13-
supabaseUrl!,
14-
supabaseServiceKey!,
15-
{
16-
auth: {
17-
autoRefreshToken: false,
18-
persistSession: false
19-
}
11+
export const supabaseAdmin = createSupabaseClient(
12+
supabaseUrl!,
13+
supabaseServiceKey!,
14+
{
15+
auth: {
16+
autoRefreshToken: false,
17+
persistSession: false
2018
}
21-
);
22-
};
19+
}
20+
);
2321

24-
/**
25-
* Legacy export for backward compatibility
26-
*/
27-
export const supabaseAdmin = createClient;
22+
// Backward compatibility function
23+
export const createClient = async () => supabaseAdmin;

lib/supabase/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from './admin';
2+
export { createClient as createBrowserClient, supabase } from './client';
3+
export { createClient as createServerClient } from './server';

0 commit comments

Comments
 (0)