FrameworkV / FoodFusionAI

Open source groceries management application powered by AI (LLMs)
1 stars 0 forks source link

Update create_user in crud.py #27

Open JanSkn opened 1 month ago

JanSkn commented 1 month ago
def create_user(db: Session, user: User):
    hashed_password = create_password_hash(user.password)
    db_user = User(username=user.username, password=hashed_password, email=user.email)
    db.add(db_user)
    db.commit()
    db.refresh(db_user)
    return db_user

user already is of type user --> remove line db_user