mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-19 01:40:08 +00:00
Solved some warnings
This commit is contained in:
parent
b54684b677
commit
31bf2bc2b1
15 changed files with 31 additions and 57 deletions
|
@ -31,14 +31,11 @@ impl Attachment {
|
|||
|
||||
pub fn to_json(&self) -> JsonValue {
|
||||
use util::get_display_size;
|
||||
use CONFIG;
|
||||
|
||||
// TODO: Change all references to localhost (maybe put it in .env?)
|
||||
let host = "http://localhost:8000";
|
||||
|
||||
let web_path = format!("{}/attachments/{}/{}", host, self.cipher_uuid, self.id);
|
||||
|
||||
let file_path = self.get_file_path();
|
||||
let display_size = get_display_size(self.file_size);
|
||||
|
||||
json!({
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use chrono::{NaiveDate, NaiveDateTime, Utc};
|
||||
use time::Duration;
|
||||
use chrono::{NaiveDateTime, Utc};
|
||||
use serde_json::Value as JsonValue;
|
||||
|
||||
use uuid::Uuid;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
use chrono::{NaiveDate, NaiveDateTime, Utc};
|
||||
use time::Duration;
|
||||
use serde_json::Value as JsonValue;
|
||||
|
||||
use uuid::Uuid;
|
||||
use chrono::{NaiveDateTime, Utc};
|
||||
|
||||
use super::User;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use chrono::{NaiveDate, NaiveDateTime, Utc};
|
||||
use time::Duration;
|
||||
use chrono::{NaiveDateTime, Utc};
|
||||
use serde_json::Value as JsonValue;
|
||||
|
||||
use uuid::Uuid;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use chrono::{NaiveDate, NaiveDateTime, Utc};
|
||||
use time::Duration;
|
||||
use chrono::{NaiveDateTime, Utc};
|
||||
use serde_json::Value as JsonValue;
|
||||
|
||||
use uuid::Uuid;
|
||||
|
@ -100,7 +99,7 @@ impl User {
|
|||
|
||||
let decoded_secret = match BASE32.decode(totp_secret.as_bytes()) {
|
||||
Ok(s) => s,
|
||||
Err(e) => return false
|
||||
Err(_) => return false
|
||||
};
|
||||
|
||||
let generated = totp_raw_now(&decoded_secret, 6, 0, 30, &HashType::SHA1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue