Update main.py
Browse files
main.py
CHANGED
@@ -258,7 +258,11 @@ async def get_protected(
|
|
258 |
# Render a template response
|
259 |
return templates.TemplateResponse("protected.html", {"request": request, "user": db_user.username})
|
260 |
|
261 |
-
|
|
|
|
|
|
|
|
|
262 |
@app.post("/password-reset-request")
|
263 |
async def password_reset_request(email: str, db: Session = Depends(get_db)):
|
264 |
user = db.query(User).filter(User.email == email).first()
|
|
|
258 |
# Render a template response
|
259 |
return templates.TemplateResponse("protected.html", {"request": request, "user": db_user.username})
|
260 |
|
261 |
+
@app.get("/reset-password", response_class=HTMLResponse)
|
262 |
+
async def reset_password_get(request: Request, token: str):
|
263 |
+
# You can add additional validation for the token if necessary
|
264 |
+
return templates.TemplateResponse("reset-password.html", {"request": request, "token": token})
|
265 |
+
|
266 |
@app.post("/password-reset-request")
|
267 |
async def password_reset_request(email: str, db: Session = Depends(get_db)):
|
268 |
user = db.query(User).filter(User.email == email).first()
|