mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-09 07:48:57 +00:00
Parametrize password actions
This commit is contained in:
@@ -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"}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user