Add get_current_user_from_token to auth.py; fix missing import in 3 api files

?token= query-param endpoints (PO/invoice print previews, recipe image exports,
backup download) call get_current_user_from_token which was not ported from the
original archive auth module. Added the function and fixed the missing import in
backup.py, ingredients.py, and invoices.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-12 12:34:01 +00:00
parent 907243c2cd
commit ecd63fc65f
4 changed files with 32 additions and 3 deletions

View file

@ -16,7 +16,7 @@ from database import get_db
from models.user import User
from models.settings import KitchenSettings
from models.backup import BackupHistory
from auth import get_current_user, require_cap
from auth import get_current_user, require_cap, get_current_user_from_token
from services.backup_service import BackupService
router = APIRouter()