update
This commit is contained in:
parent
edfb2da790
commit
abaa9f12c9
4 changed files with 114 additions and 105 deletions
|
@ -69,7 +69,7 @@ pub struct PasswdData {
|
|||
}
|
||||
|
||||
#[post("/passwd", data = "<passwd>")]
|
||||
pub async fn passwd_route(passwd: Json<PasswdData>, mut u: User) -> FallibleApiResponse {
|
||||
pub async fn passwd_route(passwd: Json<PasswdData>, u: User) -> FallibleApiResponse {
|
||||
u.passwd(&passwd.old, &passwd.new)
|
||||
.await
|
||||
.map_err(|()| api_error("Password change failed"))?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue