Update dependencies and fix some warnings

This commit is contained in:
Daniel García
2019-04-11 15:32:38 +02:00
parent d89bd707a8
commit 621f607297
7 changed files with 98 additions and 49 deletions

View File

@ -72,9 +72,7 @@ use crate::error::MapResult;
/// Database methods
impl Cipher {
pub fn to_json(&self, host: &str, user_uuid: &str, conn: &DbConn) -> Value {
use super::Attachment;
use crate::util::format_date;
use serde_json;
let attachments = Attachment::find_by_cipher(&self.uuid, conn);
let attachments_json: Vec<Value> = attachments.iter().map(|c| c.to_json(host)).collect();