Gregniuki commited on
Commit
26354f4
1 Parent(s): dc39372

Update main.py

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