mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-04-23 19:16:06 +02:00
fix: create .env file if missing when saving API keys
Docker users don't have a .env file by default, so the settings page silently failed to save keys. Now creates it automatically.
This commit is contained in:
@@ -167,7 +167,7 @@ def update_api_key(env_key: str, new_value: str) -> bool:
|
||||
return False
|
||||
|
||||
if not ENV_PATH.exists():
|
||||
return False
|
||||
ENV_PATH.write_text("", encoding="utf-8")
|
||||
|
||||
# Update os.environ immediately
|
||||
os.environ[env_key] = new_value
|
||||
|
||||
Reference in New Issue
Block a user