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 00abd4c853bad6a13542c69c79c67f480b5ee5b0
parent 1d4944b88ebe3ae58faa6892142cb3b06473dbaf
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Mon, 19 Nov 2018 20:27:49 +0100

Add create endpoint, fixes #253, fixes #261

Diffstat:
Msrc/api/core/ciphers.rs | 4++++
Msrc/api/core/mod.rs | 1+
2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs @@ -143,7 +143,11 @@ fn post_ciphers_admin(data: JsonUpcase<ShareCipherData>, headers: Headers, conn: }; 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>")] diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs @@ -39,6 +39,7 @@ pub fn routes() -> Vec<Route> { post_ciphers, put_cipher_admin, post_ciphers_admin, + post_ciphers_create, post_ciphers_import, post_attachment, post_attachment_admin,