Browse Source
Merge pull request #111 from krankur/beta
Implemented PUT for single cipher sharing (#97)
pull/115/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
6 additions and
0 deletions
-
src/api/core/ciphers.rs
-
src/api/core/mod.rs
|
|
@ -365,6 +365,11 @@ fn post_cipher_share(uuid: String, data: JsonUpcase<ShareCipherData>, headers: H |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#[put("/ciphers/<uuid>/share", data = "<data>")] |
|
|
|
fn put_cipher_share(uuid: String, data: JsonUpcase<ShareCipherData>, headers: Headers, conn: DbConn) -> JsonResult { |
|
|
|
post_cipher_share(uuid, data, headers, conn) |
|
|
|
} |
|
|
|
|
|
|
|
#[post("/ciphers/<uuid>/attachment", format = "multipart/form-data", data = "<data>")] |
|
|
|
fn post_attachment(uuid: String, data: Data, content_type: &ContentType, headers: Headers, conn: DbConn) -> JsonResult { |
|
|
|
let cipher = match Cipher::find_by_uuid(&uuid, &conn) { |
|
|
|
|
|
@ -41,6 +41,7 @@ pub fn routes() -> Vec<Route> { |
|
|
|
delete_attachment, |
|
|
|
post_cipher_admin, |
|
|
|
post_cipher_share, |
|
|
|
put_cipher_share, |
|
|
|
post_cipher, |
|
|
|
put_cipher, |
|
|
|
delete_cipher_post, |
|
|
|