Rename route

This commit is contained in:
2022-04-19 11:05:41 +02:00
parent b5a2f1abcb
commit 8cdb47a139
3 changed files with 4 additions and 4 deletions
src
templates/settings

@ -14,8 +14,8 @@ pub struct Request {
first_code: String,
}
pub async fn save_totp_key(user: CurrentUser, form: web::Json<Request>,
users: web::Data<Addr<UsersActor>>) -> impl Responder {
pub async fn save_totp_factor(user: CurrentUser, form: web::Json<Request>,
users: web::Data<Addr<UsersActor>>) -> impl Responder {
let key = TotpKey::from_encoded_secret(&form.secret);
if !key.check_code(&form.first_code).unwrap_or(false) {