commit b002d34cd47813be5e99df1b0bb1d1db2c5f1ff0
parent e46fc62b78580f272e02d4fbf986f461ee099a1e
Author: Daniel GarcĂa <dani-garcia@users.noreply.github.com>
Date: Wed, 15 Aug 2018 23:02:59 +0200
Merge pull request #139 from mprasil/edit_shared_fix
Add PUT alias for editing cipher
Diffstat:
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs
@@ -251,9 +251,14 @@ fn post_ciphers_import(data: JsonUpcase<ImportData>, headers: Headers, conn: DbC
}
}
+
+#[put("/ciphers/<uuid>/admin", data = "<data>")]
+fn put_cipher_admin(uuid: String, data: JsonUpcase<CipherData>, headers: Headers, conn: DbConn) -> JsonResult {
+ put_cipher(uuid, data, headers, conn)
+}
+
#[post("/ciphers/<uuid>/admin", data = "<data>")]
fn post_cipher_admin(uuid: String, data: JsonUpcase<CipherData>, headers: Headers, conn: DbConn) -> JsonResult {
- // TODO: Implement this correctly
post_cipher(uuid, data, headers, conn)
}
diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs
@@ -33,6 +33,7 @@ pub fn routes() -> Vec<Route> {
get_cipher_admin,
get_cipher_details,
post_ciphers,
+ put_cipher_admin,
post_ciphers_admin,
post_ciphers_import,
post_attachment,