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:
parent
907243c2cd
commit
ecd63fc65f
4 changed files with 32 additions and 3 deletions
|
|
@ -22,7 +22,7 @@ from models.line_item import LineItem
|
|||
from models.invoice import Invoice
|
||||
from models.supplier import Supplier
|
||||
from models.recipe import Recipe, RecipeIngredient, RecipeSubRecipe
|
||||
from auth import get_current_user, require_cap
|
||||
from auth import get_current_user, require_cap, get_current_user_from_token
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue