Open JanSkn opened 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
user already is of type user --> remove line db_user