Browse Source
Merge pull request #139 from mprasil/edit_shared_fix
Add PUT alias for editing cipher
pull/143/head
Daniel García
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
7 additions and
1 deletions
-
src/api/core/ciphers.rs
-
src/api/core/mod.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>")] |
|
|
#[post("/ciphers/<uuid>/admin", data = "<data>")] |
|
|
fn post_cipher_admin(uuid: String, data: JsonUpcase<CipherData>, headers: Headers, conn: DbConn) -> JsonResult { |
|
|
fn post_cipher_admin(uuid: String, data: JsonUpcase<CipherData>, headers: Headers, conn: DbConn) -> JsonResult { |
|
|
// TODO: Implement this correctly
|
|
|
|
|
|
post_cipher(uuid, data, headers, conn) |
|
|
post_cipher(uuid, data, headers, conn) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
@ -33,6 +33,7 @@ pub fn routes() -> Vec<Route> { |
|
|
get_cipher_admin, |
|
|
get_cipher_admin, |
|
|
get_cipher_details, |
|
|
get_cipher_details, |
|
|
post_ciphers, |
|
|
post_ciphers, |
|
|
|
|
|
put_cipher_admin, |
|
|
post_ciphers_admin, |
|
|
post_ciphers_admin, |
|
|
post_ciphers_import, |
|
|
post_ciphers_import, |
|
|
post_attachment, |
|
|
post_attachment, |
|
|