geforkt von mirrored/vaultwarden
Updated dependencies and fixed errors
Dieser Commit ist enthalten in:
Ursprung
a01fee0b9f
Commit
928e2424c0
4 geänderte Dateien mit 365 neuen und 136 gelöschten Zeilen
482
Cargo.lock
generiert
482
Cargo.lock
generiert
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
10
Cargo.toml
10
Cargo.toml
|
@ -13,7 +13,7 @@ rocket_contrib = "0.3.16"
|
|||
reqwest = "0.8.8"
|
||||
|
||||
# multipart/form-data support
|
||||
multipart = "0.15.2"
|
||||
multipart = "0.15.3"
|
||||
|
||||
# WebSockets library
|
||||
ws = "0.7.8"
|
||||
|
@ -25,9 +25,9 @@ rmpv = "0.4.0"
|
|||
chashmap = "2.2.0"
|
||||
|
||||
# A generic serialization/deserialization framework
|
||||
serde = "1.0.75"
|
||||
serde_derive = "1.0.75"
|
||||
serde_json = "1.0.26"
|
||||
serde = "1.0.77"
|
||||
serde_derive = "1.0.77"
|
||||
serde_json = "1.0.27"
|
||||
|
||||
# A safe, extensible ORM and Query builder
|
||||
diesel = { version = "1.3.2", features = ["sqlite", "chrono", "r2d2"] }
|
||||
|
@ -40,7 +40,7 @@ libsqlite3-sys = { version = "0.9.3", features = ["bundled"] }
|
|||
ring = { version = "= 0.11.0", features = ["rsa_signing"] }
|
||||
|
||||
# UUID generation
|
||||
uuid = { version = "0.6.5", features = ["v4"] }
|
||||
uuid = { version = "0.7.0", features = ["v4"] }
|
||||
|
||||
# Date and time library for Rust
|
||||
chrono = "0.4.6"
|
||||
|
|
|
@ -1 +1 @@
|
|||
nightly-2018-08-24
|
||||
nightly-2018-09-12
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
use rocket::State;
|
||||
use rocket_contrib::{Json, Value};
|
||||
use CONFIG;
|
||||
use db::DbConn;
|
||||
use db::models::*;
|
||||
|
||||
use api::{PasswordData, JsonResult, EmptyResult, NumberOrString, JsonUpcase};
|
||||
use api::{PasswordData, JsonResult, EmptyResult, NumberOrString, JsonUpcase, WebSocketUsers, UpdateType};
|
||||
use auth::{Headers, AdminHeaders, OwnerHeaders};
|
||||
|
||||
use serde::{Deserialize, Deserializer};
|
||||
|
@ -601,7 +602,7 @@ struct RelationsData {
|
|||
}
|
||||
|
||||
#[post("/ciphers/import-organization?<query>", data = "<data>")]
|
||||
fn post_org_import(query: OrgIdData, data: JsonUpcase<ImportData>, headers: Headers, conn: DbConn) -> EmptyResult {
|
||||
fn post_org_import(query: OrgIdData, data: JsonUpcase<ImportData>, headers: Headers, conn: DbConn, ws: State<WebSocketUsers>) -> EmptyResult {
|
||||
let data: ImportData = data.into_inner().data;
|
||||
let org_id = query.organizationId;
|
||||
|
||||
|
@ -630,7 +631,7 @@ fn post_org_import(query: OrgIdData, data: JsonUpcase<ImportData>, headers: Head
|
|||
// Read and create the ciphers
|
||||
let ciphers: Vec<_> = data.Ciphers.into_iter().map(|cipher_data| {
|
||||
let mut cipher = Cipher::new(cipher_data.Type, cipher_data.Name.clone());
|
||||
update_cipher_from_data(&mut cipher, cipher_data, &headers, false, &conn).ok();
|
||||
update_cipher_from_data(&mut cipher, cipher_data, &headers, false, &conn, &ws, UpdateType::SyncCipherCreate).ok();
|
||||
cipher
|
||||
}).collect();
|
||||
|
||||
|
|
Laden …
In neuem Issue referenzieren