Deliver Step 1: Backend cleanup — secrets scrubbed, is_admin column, Telegram optional, crypto service, v4-v7 migrations, .env.example, setup.sh
This commit is contained in:
parent
8e630233f6
commit
cb892564d9
11 changed files with 212 additions and 37 deletions
|
|
@ -24,7 +24,7 @@ from app.config import settings
|
|||
logger = logging.getLogger(__name__)
|
||||
router = APIRouter(prefix="/api/support", tags=["support"])
|
||||
|
||||
ADMIN_USERNAME = "scot"
|
||||
# Admin check uses is_admin column on User model (first registered user gets admin=True)
|
||||
MAX_MESSAGES_PER_DAY = 10
|
||||
|
||||
|
||||
|
|
@ -105,7 +105,7 @@ def format_telegram_message(user_name: str, message: str, context: dict) -> str:
|
|||
lines.append(f"Last workout: {last}")
|
||||
|
||||
lines.append(f"\n💬 \"{message}\"")
|
||||
lines.append(f"\n👉 https://fitness.littlefake.com/support/admin")
|
||||
lines.append(f"\n👉 {settings.base_url}/support/admin")
|
||||
|
||||
return "\n".join(lines)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue