|
|
@@ -165,6 +165,11 @@ async def verify_user(q: str = Query(..., description="q parameter")):
|
|
|
"""Verify a user by ID"""
|
|
|
# get url params
|
|
|
redis_client = redis.Redis(host='localhost', port=6379, db=0, decode_responses=True)
|
|
|
+ if not redis_client.get(f"verify:{q}"):
|
|
|
+ return HTMLResponse(
|
|
|
+ content="<h1>Invalid verification code</h1>",
|
|
|
+ status_code=400
|
|
|
+ )
|
|
|
return FileResponse(
|
|
|
"public/verify.html",
|
|
|
media_type="text/html",
|