From d84d8d756f2687d7587a0190c46cafea4a99f6c8 Mon Sep 17 00:00:00 2001 From: Miroslav Prasil Date: Sun, 1 Jul 2018 12:43:11 +0100 Subject: [PATCH] Implement delete-admin call --- src/api/core/ciphers.rs | 5 +++++ src/api/core/mod.rs | 1 + 2 files changed, 6 insertions(+) diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index 69dddc98..2078c30f 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -441,6 +441,11 @@ fn delete_cipher_post(uuid: String, headers: Headers, conn: DbConn) -> EmptyResu _delete_cipher_by_uuid(&uuid, &headers, &conn) } +#[post("/ciphers//delete-admin")] +fn delete_cipher_post_admin(uuid: String, headers: Headers, conn: DbConn) -> EmptyResult { + _delete_cipher_by_uuid(&uuid, &headers, &conn) +} + #[delete("/ciphers/")] fn delete_cipher(uuid: String, headers: Headers, conn: DbConn) -> EmptyResult { _delete_cipher_by_uuid(&uuid, &headers, &conn) diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs index b264f846..be5f2cf6 100644 --- a/src/api/core/mod.rs +++ b/src/api/core/mod.rs @@ -41,6 +41,7 @@ pub fn routes() -> Vec { post_cipher, put_cipher, delete_cipher_post, + delete_cipher_post_admin, delete_cipher, delete_cipher_selected, delete_all,