Wire dashboard into app

- Add web_user, web_password, secret_key as optional params to create_app
- Conditionally mount dashboard router when all three are set
- Pass settings from main.py to create_app
- Add tests for no dashboard/login routes when config absent

Made-with: Cursor
This commit is contained in:
cottongin
2026-03-12 07:19:01 -04:00
parent e90f44439b
commit 92136f0508
3 changed files with 32 additions and 0 deletions

View File

@@ -80,6 +80,9 @@ def run() -> None:
admin_token=settings.admin_token,
show_day=settings.show_day,
show_hour=settings.show_hour,
web_user=settings.web_user,
web_password=settings.web_password,
secret_key=settings.secret_key,
)
@app.on_event("startup")