mirror of
https://github.com/ViViDboarder/bitwarden_rs.git
synced 2024-11-25 22:56:38 +00:00
Merge pull request #115 from krankur/beta
Implmeneted DELETE on 'api/ciphers' to delete selected ciphers (#98)
This commit is contained in:
commit
8ffa7ebb6a
@ -461,7 +461,7 @@ fn delete_cipher(uuid: String, headers: Headers, conn: DbConn) -> EmptyResult {
|
|||||||
_delete_cipher_by_uuid(&uuid, &headers, &conn)
|
_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 {
|
fn delete_cipher_selected(data: JsonUpcase<Value>, headers: Headers, conn: DbConn) -> EmptyResult {
|
||||||
let data: Value = data.into_inner().data;
|
let data: Value = data.into_inner().data;
|
||||||
|
|
||||||
@ -482,6 +482,11 @@ fn delete_cipher_selected(data: JsonUpcase<Value>, headers: Headers, conn: DbCon
|
|||||||
Ok(())
|
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>")]
|
#[post("/ciphers/move", data = "<data>")]
|
||||||
fn move_cipher_selected(data: JsonUpcase<Value>, headers: Headers, conn: DbConn) -> EmptyResult {
|
fn move_cipher_selected(data: JsonUpcase<Value>, headers: Headers, conn: DbConn) -> EmptyResult {
|
||||||
let data = data.into_inner().data;
|
let data = data.into_inner().data;
|
||||||
|
@ -48,6 +48,7 @@ pub fn routes() -> Vec<Route> {
|
|||||||
delete_cipher_post_admin,
|
delete_cipher_post_admin,
|
||||||
delete_cipher,
|
delete_cipher,
|
||||||
delete_cipher_selected,
|
delete_cipher_selected,
|
||||||
|
delete_cipher_selected_post,
|
||||||
delete_all,
|
delete_all,
|
||||||
move_cipher_selected,
|
move_cipher_selected,
|
||||||
move_cipher_selected_put,
|
move_cipher_selected_put,
|
||||||
|
Loading…
Reference in New Issue
Block a user