Refactoring: auth tests pass

This commit is contained in:
lvrossem
2023-04-16 07:15:03 -06:00
parent d38d4d5c16
commit 0bf764a0f4
14 changed files with 116 additions and 93 deletions

View File

@@ -49,7 +49,7 @@ async def patch_current_user(
@app.post("/register")
async def register(user: users.UserCreate, db: Session = Depends(get_db)):
access_token = crud_authentication.register(
db, user.username, user.password, user.avatar
db, user.username, user.password, user.avatar_index
)
user = crud_users.get_user_by_username(db, user.username)
crud_courseprogress.initialize_user(db, user)