diff --git a/app/main.py b/app/main.py index 2cbaf53..e696f01 100644 --- a/app/main.py +++ b/app/main.py @@ -125,12 +125,12 @@ async def read_pdf(file: Annotated[bytes, File()], token: Annotated[str, Depends return {"contents": docs } @app.post("/generate_paragraphs/") -def generate_paragraphs(requirements: List[str], resume_documents: List[str]):#, token: Annotated[str, Depends(oauth2_scheme)] +def generate_paragraphs(requirements: List[str], resume_documents: List[str], token: Annotated[str, Depends(oauth2_scheme)]):#, token: Annotated[str, Depends(oauth2_scheme)] # get user data from JWT - # data = supabase.auth.get_user(token) + data = supabase.auth.get_user(token) # assert that the user is authenticated. - # assert data.user.aud == 'authenticated', "402: not authenticated." + assert data.user.aud == 'authenticated', "402: not authenticated." documents = [] diff --git a/fly.toml b/fly.toml index 0f1f8f5..c614037 100644 --- a/fly.toml +++ b/fly.toml @@ -9,18 +9,6 @@ primary_region = "yyz" [build] [env] - ANON_ROLE_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9kZ29hanJyY21kY2dxeHZ0ZnF0Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTk2MzY5NTksImV4cCI6MjAxNTIxMjk1OX0.VVZroXqDq7D2vUgNKxPQ28D-p9LfxLccsh-LwIsNy5Q" - CO_API_KEY = "AdgMMzjBDPPc0weTzZcxksZjKEgn7Vjf5I2lRoz0" - PORT = "5000" - SERVICE_ROLE_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9kZ29hanJyY21kY2dxeHZ0ZnF0Iiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTY5OTYzNjk1OSwiZXhwIjoyMDE1MjEyOTU5fQ.6iQb6_4w7XzVwtijIeuCx4MO6B0Lwdi6Efta4oc0UsY" - SUPABASE_ENDPOINT = "https://odgoajrrcmdcgqxvtfqt.supabase.co" - SUPABASE_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9kZ29hanJyY21kY2dxeHZ0ZnF0Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTk2MzY5NTksImV4cCI6MjAxNTIxMjk1OX0.VVZroXqDq7D2vUgNKxPQ28D-p9LfxLccsh-LwIsNy5Q" - SUPABASE_URL = "https://odgoajrrcmdcgqxvtfqt.supabase.co" - database = "postgres" - host = "db.odgoajrrcmdcgqxvtfqt.supabase.co" - password = "nJoP6AMfO8GLlF2b" - port = "5432" - user = "postgres" [http_service] internal_port = 5000