vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit 54afe0671eb974421400f9eb97dc8b5087a0cd28
parent d6fadb52ff8bba3d1f562e6d24eb01d782adfd27
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Wed,  1 Aug 2018 21:12:48 +0200

Merge pull request #111 from krankur/beta

Implemented PUT for single cipher sharing (#97)
Diffstat:
Msrc/api/core/ciphers.rs | 5+++++
Msrc/api/core/mod.rs | 1+
2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.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) { diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs @@ -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,