Fixing vendor dashboard area

This commit is contained in:
2025-11-21 23:15:25 +01:00
parent 5aff76a27e
commit 86f1e16ef2
38 changed files with 312 additions and 433 deletions

View File

@@ -198,18 +198,15 @@ def vendor_logout(response: Response):
@router.get("/me")
def get_current_vendor_user(
request: Request,
user: User = Depends(get_current_vendor_api),
db: Session = Depends(get_db)
):
"""
Get current authenticated vendor user.
This endpoint can be called to verify authentication and get user info.
Requires Authorization header (header-only authentication for API endpoints).
"""
# This will check both cookie and header
user = get_current_vendor_api(request, db=db)
return {
"id": user.id,
"username": user.username,