Gregniuki commited on
Commit
c02b541
1 Parent(s): 6856caa

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -118,7 +118,7 @@ async def verify_email(verification_token: str, request: Request, db: Session =
118
  return RedirectResponse("/protected")
119
 
120
  # User authentication (protected route)
121
- @app.get("/protected", response_class=HTMLResponse) # Specify response_class as HTMLResponse
122
  async def protected_route(request: Request, token: str = Depends(oauth2_scheme), db: Session = Depends(get_db)):
123
  # Verify the access token
124
  user = verify_token(token, my_secret_key, "HS256")
 
118
  return RedirectResponse("/protected")
119
 
120
  # User authentication (protected route)
121
+ @app.post("/protected", response_class=HTMLResponse) # Specify response_class as HTMLResponse
122
  async def protected_route(request: Request, token: str = Depends(oauth2_scheme), db: Session = Depends(get_db)):
123
  # Verify the access token
124
  user = verify_token(token, my_secret_key, "HS256")