Update dependencies and add /ciphers/create

This commit is contained in:
Daniel García 2018-11-19 20:21:02 +01:00
parent 5edbd0e952
commit a4550e51ea
No known key found for this signature in database
GPG Key ID: FC8A7D14C3CD543A
3 changed files with 9 additions and 4 deletions

View File

@ -5,7 +5,7 @@ authors = ["Daniel García <dani-garcia@users.noreply.github.com>"]
[dependencies] [dependencies]
# Web framework for nightly with a focus on ease-of-use, expressibility, and speed. # 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" rocket_contrib = "0.4.0-rc.1"
# HTTP client # HTTP client
@ -63,7 +63,7 @@ yubico= { version = "=0.4.0", default-features = false }
dotenv = { version = "0.13.0", default-features = false } dotenv = { version = "0.13.0", default-features = false }
# Lazy static macro # Lazy static macro
lazy_static = "1.2.0" lazy_static = { version = "1.2.0", features = ["nightly"] }
# Numerical libraries # Numerical libraries
num-traits = "0.2.6" num-traits = "0.2.6"

View File

@ -1 +1 @@
nightly-2018-10-31 nightly-2018-11-19

View File

@ -32,6 +32,7 @@ pub fn routes() -> Vec<Route> {
post_ciphers, post_ciphers,
put_cipher_admin, put_cipher_admin,
post_ciphers_admin, post_ciphers_admin,
post_ciphers_create,
post_ciphers_import, post_ciphers_import,
post_attachment, post_attachment,
post_attachment_admin, 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) 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>")] #[post("/ciphers", data = "<data>")]