Skip to content

Instantly share code, notes, and snippets.

@cuongld2
Last active March 16, 2020 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cuongld2/2a138a98444987d2eb54fc89338222da to your computer and use it in GitHub Desktop.
Save cuongld2/2a138a98444987d2eb54fc89338222da to your computer and use it in GitHub Desktop.
fast_api_self_study
def create_user(db: Session, user: schemas.UserCreate):
fake_hashed_password = user.password + "notreallyhashed"
db_user = models.UserInfo(username=user.username, password=fake_hashed_password, fullname=user.fullname)
db.add(db_user)
db.commit()
db.refresh(db_user)
return db_user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment