Skip to content

Commit

Permalink
feat: support 3rd auth
Browse files Browse the repository at this point in the history
  • Loading branch information
RaoHai committed Sep 5, 2024
1 parent a7b5e01 commit 748fde8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
CLIENT_ID = get_env_variable("AUTH0_CLIENT_ID")
API_URL = get_env_variable("API_URL")
WEB_URL = get_env_variable("WEB_URL")
ENVRIMENT = get_env_variable("PETERCAT_ENV", "development")
CALLBACK_URL = f"{API_URL}/api/auth/callback"

is_dev = bool(get_env_variable("IS_DEV"))
Expand Down Expand Up @@ -68,6 +69,7 @@ def home_page():
@app.get("/api/health_checker")
def health_checker():
return {
"ENVRIMENT": ENVRIMENT,
"API_URL": API_URL,
"WEB_URL": WEB_URL,
"CALLBACK_URL": CALLBACK_URL,
Expand Down
2 changes: 2 additions & 0 deletions server/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@

API_URL = get_env_variable("API_URL")
WEB_URL = get_env_variable("WEB_URL")
ENVRIMENT = get_env_variable("PETERCAT_ENV", "development")

client = TestClient(app)

def test_health_checker():
response = client.get("/api/health_checker")
assert response.status_code == 200
assert response.json() == {
'ENVRIMENT': 'development',
'API_URL': API_URL,
'CALLBACK_URL': f'{API_URL}/api/auth/callback',
'WEB_URL': WEB_URL,
Expand Down

0 comments on commit 748fde8

Please sign in to comment.