Gregniuki commited on
Commit
069ccc6
1 Parent(s): 4da28a8

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -1
main.py CHANGED
@@ -42,9 +42,13 @@ async def register_get(request: Request):
42
  @app.post("/register", response_class=HTMLResponse)
43
  async def register_post(
44
  request: Request,
45
- user: UserCreate = Depends(),
 
 
 
46
  db: Session = Depends(get_db)
47
  ):
 
48
  registered_user = register(user, db)
49
  return RedirectResponse("/registration_successful")
50
 
 
42
  @app.post("/register", response_class=HTMLResponse)
43
  async def register_post(
44
  request: Request,
45
+ username: str = Form(...),
46
+ email: str = Form(...),
47
+ password: str = Form(...),
48
+ confirm_password: str = Form(...),
49
  db: Session = Depends(get_db)
50
  ):
51
+ user = UserCreate(username=username, email=email, password=password, confirm_password=confirm_password)
52
  registered_user = register(user, db)
53
  return RedirectResponse("/registration_successful")
54