aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/login.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/login.rs')
-rw-r--r--src/api/login.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/api/login.rs b/src/api/login.rs
index 02c54a3..e442ea2 100644
--- a/src/api/login.rs
+++ b/src/api/login.rs
@@ -674,7 +674,7 @@ async fn end(state: &AppState, claims: &Claims, by: &str) -> Result<(), ApiError
let until = claims.login_exp.max(claims.session_exp);
let recorded = if state.is_ready().await {
state
- .mutate_doc_for(Some(by.to_owned()), Sign::Protocol, move |doc| {
+ .mutate_doc_by(Some(by.to_owned()), Sign::Protocol, move |doc| {
if !registry::exists(&*doc) {
return Ok::<_, ApiError>(false);
}
@@ -682,7 +682,6 @@ async fn end(state: &AppState, claims: &Claims, by: &str) -> Result<(), ApiError
Ok(true)
})
.await?
- .0
} else {
false
};
@@ -773,7 +772,7 @@ pub(crate) async fn revoke_tokens(state: &AppState, name: &str, by: &str) -> Res
// Issued in this very millisecond: revoked too.
let after = state.clock.now_millis().as_u64() + 1;
state
- .mutate_doc_for(Some(by.to_owned()), Sign::Protocol, move |doc| {
+ .mutate_doc_by(Some(by.to_owned()), Sign::Protocol, move |doc| {
if !registry::exists(&*doc) {
return Err(ApiError(
StatusCode::CONFLICT,