Update main.py
Browse files
main.py
CHANGED
@@ -216,8 +216,8 @@ async def registration_successful(request: Request):
|
|
216 |
|
217 |
|
218 |
@app.get("/verify", response_class=HTMLResponse)
|
219 |
-
async def verify_email(
|
220 |
-
user = get_user_by_verification_token(db,
|
221 |
if not user:
|
222 |
raise HTTPException(status_code=400, detail="Invalid verification token")
|
223 |
|
|
|
216 |
|
217 |
|
218 |
@app.get("/verify", response_class=HTMLResponse)
|
219 |
+
async def verify_email(token: str, db: Session = Depends(get_db)):
|
220 |
+
user = get_user_by_verification_token(db, token)
|
221 |
if not user:
|
222 |
raise HTTPException(status_code=400, detail="Invalid verification token")
|
223 |
|