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 8ffa7ebb6abea34f93b43aabba2ab3193234bba3
parent 54afe0671eb974421400f9eb97dc8b5087a0cd28
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Fri,  3 Aug 2018 16:29:23 +0200

Merge pull request #115 from krankur/beta

Implmeneted DELETE on 'api/ciphers' to delete selected ciphers (#98)
Diffstat:
Msrc/api/core/ciphers.rs | 7++++++-
Msrc/api/core/mod.rs | 1+
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs @@ -461,7 +461,7 @@ fn delete_cipher(uuid: String, headers: Headers, conn: DbConn) -> EmptyResult { _delete_cipher_by_uuid(&uuid, &headers, &conn) } -#[post("/ciphers/delete", data = "<data>")] +#[delete("/ciphers", data = "<data>")] fn delete_cipher_selected(data: JsonUpcase<Value>, headers: Headers, conn: DbConn) -> EmptyResult { let data: Value = data.into_inner().data; @@ -482,6 +482,11 @@ fn delete_cipher_selected(data: JsonUpcase<Value>, headers: Headers, conn: DbCon Ok(()) } +#[post("/ciphers/delete", data = "<data>")] +fn delete_cipher_selected_post(data: JsonUpcase<Value>, headers: Headers, conn: DbConn) -> EmptyResult { + delete_cipher_selected(data, headers, conn) +} + #[post("/ciphers/move", data = "<data>")] fn move_cipher_selected(data: JsonUpcase<Value>, headers: Headers, conn: DbConn) -> EmptyResult { let data = data.into_inner().data; diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs @@ -48,6 +48,7 @@ pub fn routes() -> Vec<Route> { delete_cipher_post_admin, delete_cipher, delete_cipher_selected, + delete_cipher_selected_post, delete_all, move_cipher_selected, move_cipher_selected_put,