Rename to stealergram, add pyproject.toml, purge em-dashes
- Rename project to stealergram throughout - Add pyproject.toml (replaces requirements.txt split, folds pytest.ini) - Replace all em-dashes with hyphens across all source files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
10
web/db.py
10
web/db.py
@@ -1,9 +1,9 @@
|
||||
"""
|
||||
web/db.py — SQLite user store for the web frontend.
|
||||
web/db.py - SQLite user store for the web frontend.
|
||||
|
||||
Tables:
|
||||
users — credentials + role + active flag
|
||||
refresh_tokens — JTI-indexed refresh token revocation list
|
||||
users - credentials + role + active flag
|
||||
refresh_tokens - JTI-indexed refresh token revocation list
|
||||
|
||||
Bootstrap: on first init, creates a superadmin from WEB_ADMIN_USER / WEB_ADMIN_PASS
|
||||
env vars (required only on first run if the DB doesn't exist yet).
|
||||
@@ -63,7 +63,9 @@ def init_db() -> None:
|
||||
admin_pass = os.environ.get("WEB_ADMIN_PASS")
|
||||
if not admin_pass:
|
||||
raise RuntimeError(
|
||||
"WEB_ADMIN_PASS env var is required on first run to create the superadmin."
|
||||
"WEB_ADMIN_PASS env var is required on first run to bootstrap the superadmin. "
|
||||
"Add WEB_ADMIN_PASS=<password> (and optionally WEB_ADMIN_USER=<username>) "
|
||||
"to your .env file, then restart."
|
||||
)
|
||||
conn.execute(
|
||||
"INSERT INTO users (id, username, password_hash, role, created_at) VALUES (?,?,?,?,?)",
|
||||
|
||||
Reference in New Issue
Block a user