mirror of
https://github.com/Sosokker/B2D-Ventures.git
synced 2025-12-19 22:14:06 +01:00
fix: use role key instead of anon key
This commit is contained in:
parent
0523f6d712
commit
67a1fe0f7f
@ -1,17 +1,17 @@
|
|||||||
import { createClient } from "@supabase/supabase-js";
|
import { createClient } from "@supabase/supabase-js";
|
||||||
|
|
||||||
const supabase_url = process.env.NEXT_PUBLIC_SUPABASE_URL;
|
const supabase_url = process.env.NEXT_PUBLIC_SUPABASE_URL;
|
||||||
const supabase_anon_key = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;
|
const supabase_role_key = process.env.SUPABASE_SERVICE_ROLE_KEY;
|
||||||
|
|
||||||
if (!supabase_url) {
|
if (!supabase_url) {
|
||||||
throw "Supabase Url is undefine";
|
throw "Supabase Url is undefine";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!supabase_anon_key) {
|
if (!supabase_role_key) {
|
||||||
throw "Supabase Anon Key is undefine";
|
throw "Supabase Anon Key is undefine";
|
||||||
}
|
}
|
||||||
|
|
||||||
const supabase = createClient(supabase_url, supabase_anon_key);
|
const supabase = createClient(supabase_url, supabase_role_key);
|
||||||
|
|
||||||
export async function deleteUser(userId: string) {
|
export async function deleteUser(userId: string) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user