Parametrize password actions

This commit is contained in:
thePR0M3TH3AN
2025-07-17 19:38:28 -04:00
parent 7af92195c4
commit 8bd9a75629
11 changed files with 64 additions and 46 deletions

View File

@@ -554,11 +554,13 @@ def backup_parent_seed(
@app.post("/api/v1/change-password")
def change_password(authorization: str | None = Header(None)) -> dict[str, str]:
def change_password(
data: dict, authorization: str | None = Header(None)
) -> dict[str, str]:
"""Change the master password for the active profile."""
_check_token(authorization)
assert _pm is not None
_pm.change_password()
_pm.change_password(data.get("old", ""), data.get("new", ""))
return {"status": "ok"}