diff options
author | Daniel García <[email protected]> | 2018-11-19 20:21:02 +0100 |
---|---|---|
committer | Daniel García <[email protected]> | 2018-11-19 20:21:02 +0100 |
commit | a4550e51ea2425e65c6aab7118398a349301acf5 (patch) | |
tree | 1c82b5a2079c81d000356f0301c38a31ec5dfe85 | |
parent | 5edbd0e9528c1f398dd9f27846b9a69a3a320da4 (diff) | |
download | vaultwarden-a4550e51ea2425e65c6aab7118398a349301acf5.tar.gz vaultwarden-a4550e51ea2425e65c6aab7118398a349301acf5.zip |
Update dependencies and add /ciphers/create
-rw-r--r-- | Cargo.toml | 6 | ||||
-rw-r--r-- | rust-toolchain | 2 | ||||
-rw-r--r-- | src/api/core/ciphers.rs | 5 |
3 files changed, 9 insertions, 4 deletions
@@ -5,7 +5,7 @@ authors = ["Daniel García <[email protected]>"] [dependencies] # Web framework for nightly with a focus on ease-of-use, expressibility, and speed. -rocket = { version = "0.4.0-rc.1", features = ["tls"] } +rocket = { version = "0.4.0-rc.1", features = ["tls"], default-features = false } rocket_contrib = "0.4.0-rc.1" # HTTP client @@ -57,13 +57,13 @@ jsonwebtoken = "5.0.1" u2f = "0.1.2" # Yubico Library -yubico= { version = "=0.4.0", default-features = false } +yubico = { version = "=0.4.0", default-features = false } # A `dotenv` implementation for Rust dotenv = { version = "0.13.0", default-features = false } # Lazy static macro -lazy_static = "1.2.0" +lazy_static = { version = "1.2.0", features = ["nightly"] } # Numerical libraries num-traits = "0.2.6" diff --git a/rust-toolchain b/rust-toolchain index 0147c3ef..51ddc680 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2018-10-31 +nightly-2018-11-19 diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index 0103c6ee..ef5414d9 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -32,6 +32,7 @@ pub fn routes() -> Vec<Route> { post_ciphers, put_cipher_admin, post_ciphers_admin, + post_ciphers_create, post_ciphers_import, post_attachment, post_attachment_admin, @@ -175,7 +176,11 @@ fn post_ciphers_admin(data: JsonUpcase<ShareCipherData>, headers: Headers, conn: }; share_cipher_by_uuid(&cipher.uuid, data, &headers, &conn, &ws) +} +#[post("/ciphers/create", data = "<data>")] +fn post_ciphers_create(data: JsonUpcase<ShareCipherData>, headers: Headers, conn: DbConn, ws: State<WebSocketUsers>) -> JsonResult { + post_ciphers_admin(data, headers, conn, ws) } #[post("/ciphers", data = "<data>")] |