342e2d1614
Merges origin/main (v0.155.0) into the classification feature branch, resolving all 18 conflicted files by accepting main's version and re-applying only classification-specific additions: - Renumber migration from 037 to 038 (chains from 037_user_sessions) - Re-add ClassificationRuleModel to models.py, env.py, conftest.py - Re-add classification_rules_router to api/__init__.py - All session management, QR auth, and devices code preserved from main Migration chain validated. 62 classification tests pass. Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
27 lines
609 B
Python
27 lines
609 B
Python
"""View route for the QR code mobile login page.
|
|
|
|
Route:
|
|
GET /qr-login — renders the QR login page (requires login)
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import logging
|
|
|
|
from fastapi import Request
|
|
|
|
from app.views.base import APIRouter, require_login, templates
|
|
|
|
logger = logging.getLogger(__name__)
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("/qr-login", include_in_schema=False)
|
|
@require_login
|
|
async def qr_login_page(request: Request):
|
|
"""Serve the QR code login page for mobile app authentication."""
|
|
return templates.TemplateResponse(
|
|
"qr_login.html",
|
|
{"request": request},
|
|
)
|