mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-12-05 17:13:45 +01: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.
Former-commit-id: 1d0ccdd55a
This commit is contained in:
1 parent
a57c9be0cb
commit
bf0da2c434
1 file changed
+1
-1
@@ -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