Buuntu / fastapi-react

🚀 Cookiecutter Template for FastAPI + React Projects. Using PostgreSQL, SQLAlchemy, and Docker
MIT License
2.22k stars 350 forks source link

incorrect type on get_user_by_email() #153

Open cardoe opened 3 years ago

cardoe commented 3 years ago

The current signature is def get_user_by_email(db: Session, email: str) -> schemas.UserBase: but I believe this to be incorrect. It should be def get_user_by_email(db: Session, email: str) -> schemas.User:. The reason is that this function returns the DB row which includes the id as part of the model.