Solved some warnings

This commit is contained in:
Daniel García
2018-02-15 00:53:11 +01:00
parent b54684b677
commit 31bf2bc2b1
15 changed files with 31 additions and 57 deletions

View File

@@ -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!({