Skip to content

Commit

Permalink
fix login param
Browse files Browse the repository at this point in the history
  • Loading branch information
MateoLostanlen committed Apr 11, 2024
1 parent dfa8367 commit 33ee682
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
API_URL: str = os.environ.get("API_URL", "")
API_LOGIN: str = os.environ.get("API_LOGIN", "")
API_PWD: str = os.environ.get("API_PWD", "")
LOGIN: bool = os.environ.get("LOGIN", "").lower() != "true"
LOGIN: bool = os.environ.get("LOGIN", "true").lower() == "true"
PYRORISK_FALLBACK: str = "https://github.com/pyronear/pyro-risks/releases/download/v0.1.0-data/pyrorisk_20200901.json"
GEOJSON_FILE: str = "https://github.com/pyronear/pyro-risks/releases/download/v0.1.0-data/departements.geojson"
# Sentry
Expand Down
2 changes: 1 addition & 1 deletion app/layouts/main_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from components.navbar import Navbar
from services import api_client

if cfg.LOGIN:
if not cfg.LOGIN:
client = Client(cfg.API_URL, cfg.API_LOGIN, cfg.API_PWD)
user_headers = client.headers
user_token = user_headers["Authorization"].split(" ")[1]
Expand Down

0 comments on commit 33ee682

Please sign in to comment.