used .env for supabase secrets
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Failing after 52s
Build and deploy the backend to staging / Deploy to staging (pull_request) Has been skipped
Run linting on the backend code / Build (pull_request) Successful in 50s
Run testing on the backend code / Build (pull_request) Failing after 3m8s
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Failing after 52s
Build and deploy the backend to staging / Deploy to staging (pull_request) Has been skipped
Run linting on the backend code / Build (pull_request) Successful in 50s
Run testing on the backend code / Build (pull_request) Failing after 3m8s
This commit is contained in:
@@ -5,6 +5,7 @@ from fastapi import HTTPException, status
|
|||||||
from supabase import create_client, Client, ClientOptions
|
from supabase import create_client, Client, ClientOptions
|
||||||
|
|
||||||
from ..constants import PARAMETERS_DIR
|
from ..constants import PARAMETERS_DIR
|
||||||
|
from ..configuration.environment import Environment
|
||||||
|
|
||||||
# Silence the supabase logger
|
# Silence the supabase logger
|
||||||
logging.getLogger("httpx").setLevel(logging.CRITICAL)
|
logging.getLogger("httpx").setLevel(logging.CRITICAL)
|
||||||
@@ -18,11 +19,9 @@ class SupabaseClient:
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
with open(os.path.join(PARAMETERS_DIR, 'secrets.yaml')) as f:
|
self.SUPABASE_URL = Environment.supabase_url
|
||||||
secrets = yaml.safe_load(f)
|
self.SUPABASE_ADMIN_KEY = Environment.supabase_admin_key
|
||||||
self.SUPABASE_URL = secrets['SUPABASE_URL']
|
self.SUPABASE_TEST_USER_ID = Environment.supabase_test_user_id
|
||||||
self.SUPABASE_ADMIN_KEY = secrets['SUPABASE_ADMIN_KEY']
|
|
||||||
self.SUPABASE_TEST_USER_ID = secrets['SUPABASE_TEST_USER_ID']
|
|
||||||
|
|
||||||
self.supabase = create_client(
|
self.supabase = create_client(
|
||||||
self.SUPABASE_URL,
|
self.SUPABASE_URL,
|
||||||
|
Reference in New Issue
Block a user