completionId: cgen-b16835952f484bfda1f79aa66b6898a7
cgen-b16835952f484bfda1f79aa66b6898a7
This commit is contained in:
parent
04a5c03482
commit
6977313a86
1 changed files with 11 additions and 4 deletions
|
|
@ -1,10 +1,17 @@
|
||||||
import type { VercelRequest, VercelResponse } from "@vercel/node";
|
import type { VercelRequest, VercelResponse } from "@vercel/node";
|
||||||
import { createClient } from "@supabase/supabase-js";
|
import { createClient } from "@supabase/supabase-js";
|
||||||
|
|
||||||
const supabase = createClient(
|
// Initialize Supabase with service role
|
||||||
process.env.SUPABASE_URL || "",
|
let supabase: any = null;
|
||||||
process.env.SUPABASE_SERVICE_ROLE || ""
|
|
||||||
);
|
try {
|
||||||
|
supabase = createClient(
|
||||||
|
process.env.SUPABASE_URL || "",
|
||||||
|
process.env.SUPABASE_SERVICE_ROLE || ""
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Failed to initialize Supabase client:", e);
|
||||||
|
}
|
||||||
|
|
||||||
interface RoleMapping {
|
interface RoleMapping {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue