Cleanup and bugfixes on Bootstrap and JSONL handling.

This commit is contained in:
2026-01-26 23:54:03 +00:00
parent 7e568dbd10
commit 4ddaa9fdf4
8 changed files with 205 additions and 152 deletions
-25
View File
@@ -220,31 +220,6 @@ async def get_settings():
}
@app.get("/token-info")
async def api_token_info(token: str):
"""Get information about a reset token.
Returns:
- type: "reset"
- user_name: display name of the user
- token_type: type of reset token
"""
if not passphrase.is_well_formed(token):
raise HTTPException(status_code=404, detail="Invalid token")
# Check if this is a reset token
try:
reset_token = await get_reset(token)
user = db.get_user_by_uuid(reset_token.user_uuid)
return {
"type": "reset",
"user_name": user.display_name,
"token_type": reset_token.token_type,
}
except (ValueError, Exception):
raise HTTPException(status_code=404, detail="Token not found or expired")
@app.post("/user-info")
async def api_user_info(
request: Request,