summaryrefslogtreecommitdiff
path: root/src/user/handlers/password/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/handlers/password/mod.rs')
-rw-r--r--src/user/handlers/password/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/user/handlers/password/mod.rs b/src/user/handlers/password/mod.rs
index c327e87..5e69c1c 100644
--- a/src/user/handlers/password/mod.rs
+++ b/src/user/handlers/password/mod.rs
@@ -7,13 +7,13 @@ use axum::{
use crate::{
app::App,
clock::RequestedAt,
+ empty::Empty,
error::Internal,
password::Password,
token::{
app,
extract::{Identity, IdentityCookie},
},
- user::User,
};
#[cfg(test)]
@@ -25,14 +25,14 @@ pub async fn handler(
identity: Identity,
cookie: IdentityCookie,
Json(request): Json<Request>,
-) -> Result<(IdentityCookie, Json<User>), Error> {
- let (login, secret) = app
+) -> Result<(IdentityCookie, Empty), Error> {
+ let secret = app
.tokens()
.change_password(&identity.user, &request.password, &request.to, &now)
.await
.map_err(Error)?;
let cookie = cookie.set(secret);
- Ok((cookie, Json(login)))
+ Ok((cookie, Empty))
}
#[derive(serde::Deserialize)]