mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-07-10 18:24:43 -06:00
fix: typos
This commit is contained in:
parent
8cba57a1af
commit
224ad8a406
@ -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,]
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user