fix: typos

This commit is contained in:
Raphaël Roumezin 2026-06-24 13:00:48 +02:00
parent 8cba57a1af
commit 224ad8a406
2 changed files with 17 additions and 18 deletions

View File

@ -1,3 +1,18 @@
use crate::{
CONFIG,
api::{
EmptyResult, JsonResult, PasswordOrOtpData,
core::{log_user_event, two_factor::generate_recover_code},
},
auth::Headers,
crypto::ct_eq,
db::{
DbConn,
models::{EventType, TwoFactor, TwoFactorType, UserId},
},
error::Error,
util::NumberOrString,
};
use rocket::{Route, serde::json::Json};
use serde_json::Value;
use std::{str::FromStr, sync::LazyLock};
@ -26,22 +41,6 @@ pub static WEBAUTHN: LazyLock<Webauthn> = LazyLock::new(|| {
webauthn.build().expect("Building Webauthn failed")
});
use crate::{
CONFIG,
api::{
EmptyResult, JsonResult, PasswordOrOtpData,
core::{log_user_event, two_factor::generate_recover_code},
},
auth::Headers,
crypto::ct_eq,
db::{
DbConn,
models::{EventType, TwoFactor, TwoFactorType, UserId},
},
error::Error,
util::NumberOrString,
};
pub fn routes() -> Vec<Route> {
routes![get_webauthn, generate_webauthn_challenge, activate_webauthn, activate_webauthn_put, delete_webauthn,]
}

View File

@ -23,12 +23,12 @@ pub fn routes() -> Vec<rocket::Route> {
#[get("/webauthn")]
async fn get_webauthn(headers: Headers, conn: DbConn) -> JsonResult {
if !CONFIG.passkey_login_allowed() {
// The web vault will query this endpoint weather passkey login is allowed, so we should return an empty list instead of an error.
// The web vault will query this endpoint whether passkey login is allowed or not, so we should return an empty list instead of an error.
return Ok(Json(json!({
"object": "list",
"data": [],
"continuationToken": null
})))
})));
}
let user = headers.user;