Update dependencies and fix some warnings

This commit is contained in:
Daniel García committed 2019-04-11 15:40:19 +02:00
1 parent d89bd707a8
commit 621f607297
7 files changed
+98 -49

No files matched your search

-2
View File
@@ -113,8 +113,6 @@ use crate::error::MapResult;
/// Database methods
impl User {
pub fn to_json(&self, conn: &DbConn) -> Value {
use super::{TwoFactor, UserOrganization};
let orgs = UserOrganization::find_by_user(&self.uuid, conn);
let orgs_json: Vec<Value> = orgs.iter().map(|c| c.to_json(&conn)).collect();
let twofactor_enabled = !TwoFactor::find_by_user(&self.uuid, conn).is_empty();