first commit

This commit is contained in:
luoyangwei
2026-06-06 00:49:07 +08:00
commit 2b860d201e
134 changed files with 22773 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
+21
View File
@@ -0,0 +1,21 @@
import { createClient } from "@supabase/supabase-js";
export function createSupabaseServiceRoleClient() {
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL;
const serviceRoleKey = process.env.SUPABASE_SERVICE_ROLE_KEY;
if (!supabaseUrl) {
throw new Error("NEXT_PUBLIC_SUPABASE_URL is not configured.");
}
if (!serviceRoleKey) {
throw new Error("SUPABASE_SERVICE_ROLE_KEY is not configured.");
}
return createClient(supabaseUrl, serviceRoleKey, {
auth: {
persistSession: false,
autoRefreshToken: false,
},
});
}