1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-07-18 02:01:08 +00:00

Implement suggested improvements

This commit is contained in:
Miroslav Prasil 2018-05-03 17:47:27 +01:00
parent c3be1b4298
commit a0796acbc7
5 changed files with 7 additions and 8 deletions

View file

@ -253,8 +253,7 @@ fn post_ciphers_import(data: Json<ImportData>, headers: Headers, conn: DbConn) -
if update_cipher_from_data(&mut cipher, cipher_data, &headers, &conn).is_err() { err!("Error creating cipher") }
//cipher.folder_uuid = folder_uuid; // TODO: This needs to create new folder-cipher mapping
cipher.move_to_folder(folder_uuid, &headers.user.uuid.clone(), &conn).ok();
cipher.save(&conn);
index += 1;
}

View file

@ -97,7 +97,7 @@ fn login(connect_data: Form<ConnectData>, device_type: DeviceType, conn: DbConn)
};
let user = User::find_by_uuid(&device.user_uuid, &conn).unwrap();
let orgs = UserOrganization::find_by_user(&user.uuid, &conn).unwrap_or(vec![]);
let orgs = UserOrganization::find_by_user(&user.uuid, &conn);
let (access_token, expires_in) = device.refresh_tokens(&user, orgs);
device.save(&conn);