aboutsummaryrefslogtreecommitdiff
path: root/src/api/identity.rs
diff options
context:
space:
mode:
authorDaniel García <[email protected]>2018-12-07 02:05:45 +0100
committerDaniel García <[email protected]>2018-12-07 02:05:45 +0100
commit94810c106a96adab678434a93c9defe125fc8809 (patch)
tree5dd3a45deed97d2733d7594bc245451b79c35ca0 /src/api/identity.rs
parent2fde4e693363266a93d450f26ad0b5cc9cebb53a (diff)
downloadvaultwarden-94810c106a96adab678434a93c9defe125fc8809.tar.gz
vaultwarden-94810c106a96adab678434a93c9defe125fc8809.zip
Migrate to rust 2018 edition
Diffstat (limited to 'src/api/identity.rs')
-rw-r--r--src/api/identity.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/api/identity.rs b/src/api/identity.rs
index 940fcbf9..8236b1d7 100644
--- a/src/api/identity.rs
+++ b/src/api/identity.rs
@@ -8,14 +8,14 @@ use serde_json::Value;
use num_traits::FromPrimitive;
-use db::models::*;
-use db::DbConn;
+use crate::db::models::*;
+use crate::db::DbConn;
-use util::{self, JsonMap};
+use crate::util::{self, JsonMap};
-use api::{ApiResult, EmptyResult, JsonResult};
+use crate::api::{ApiResult, EmptyResult, JsonResult};
-use CONFIG;
+use crate::CONFIG;
pub fn routes() -> Vec<Route> {
routes![login]
@@ -194,13 +194,13 @@ fn twofactor_auth(
}
Some(TwoFactorType::U2f) => {
- use api::core::two_factor;
+ use crate::api::core::two_factor;
two_factor::validate_u2f_login(user_uuid, &twofactor_code, conn)?;
}
Some(TwoFactorType::YubiKey) => {
- use api::core::two_factor;
+ use crate::api::core::two_factor;
two_factor::validate_yubikey_login(user_uuid, twofactor_code, conn)?;
}
@@ -217,7 +217,7 @@ fn twofactor_auth(
}
fn _json_err_twofactor(providers: &[i32], user_uuid: &str, conn: &DbConn) -> ApiResult<Value> {
- use api::core::two_factor;
+ use crate::api::core::two_factor;
let mut result = json!({
"error" : "invalid_grant",