Skip to content

Commit

Permalink
Supabase API
Browse files Browse the repository at this point in the history
  • Loading branch information
mouredev committed Feb 8, 2024
1 parent f9fbd6f commit bc47396
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion link_bio/link_bio/api/SupabaseAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ class SupabaseAPI:
supabase: Client

def __init__(self) -> None:
if self.SUPABASE_URL != "" and self.SUPABASE_KEY != "":
self.supabase = None

def create_client(self):
if self.supabase is None:
self.supabase = create_client(self.SUPABASE_URL, self.SUPABASE_KEY)

def featured(self) -> list:

if self.supabase is None:
self.create_client()

response = self.supabase.table("featured").select("*").execute()

featured_data = []
Expand Down

0 comments on commit bc47396

Please sign in to comment.