mirror of
https://github.com/willchen96/mike.git
synced 2026-06-12 20:45:13 +02:00
fix: enforce SUPABASE_URL and SUPABASE_SECRET_KEY presence in server-side client; remove unused supabase-server.ts file
This commit is contained in:
parent
aed8c42e94
commit
9749d601fa
3 changed files with 4 additions and 40 deletions
|
|
@ -7,6 +7,9 @@ import { createClient } from "@supabase/supabase-js";
|
|||
export function createServerSupabase() {
|
||||
const url = process.env.SUPABASE_URL || "";
|
||||
const key = process.env.SUPABASE_SECRET_KEY || "";
|
||||
if (!url || !key) {
|
||||
throw new Error("SUPABASE_URL and SUPABASE_SECRET_KEY must be set");
|
||||
}
|
||||
return createClient(url, key, { auth: { persistSession: false } });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue