1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-06-24 08:15:41 +02:00

Add DELETE handlers fo cipher and attachment deletion (fixes #158) (#160)

Dieser Commit ist enthalten in:
mprasil 2018-08-28 23:48:53 +01:00 committet von Daniel García
Ursprung 761a0a3393
Commit 3cfdf9b585
2 geänderte Dateien mit 12 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -520,6 +520,11 @@ fn delete_attachment(uuid: String, attachment_id: String, headers: Headers, conn
_delete_cipher_attachment_by_id(&uuid, &attachment_id, &headers, &conn)
}
#[delete("/ciphers/<uuid>/attachment/<attachment_id>/admin")]
fn delete_attachment_admin(uuid: String, attachment_id: String, headers: Headers, conn: DbConn) -> EmptyResult {
_delete_cipher_attachment_by_id(&uuid, &attachment_id, &headers, &conn)
}
#[post("/ciphers/<uuid>/delete")]
fn delete_cipher_post(uuid: String, headers: Headers, conn: DbConn) -> EmptyResult {
_delete_cipher_by_uuid(&uuid, &headers, &conn)
@ -535,6 +540,11 @@ fn delete_cipher(uuid: String, headers: Headers, conn: DbConn) -> EmptyResult {
_delete_cipher_by_uuid(&uuid, &headers, &conn)
}
#[delete("/ciphers/<uuid>/admin")]
fn delete_cipher_admin(uuid: String, headers: Headers, conn: DbConn) -> EmptyResult {
_delete_cipher_by_uuid(&uuid, &headers, &conn)
}
#[delete("/ciphers", data = "<data>")]
fn delete_cipher_selected(data: JsonUpcase<Value>, headers: Headers, conn: DbConn) -> EmptyResult {
let data: Value = data.into_inner().data;

Datei anzeigen

@ -43,6 +43,7 @@ pub fn routes() -> Vec<Route> {
delete_attachment_post,
delete_attachment_post_admin,
delete_attachment,
delete_attachment_admin,
post_cipher_admin,
post_cipher_share,
put_cipher_share,
@ -52,6 +53,7 @@ pub fn routes() -> Vec<Route> {
delete_cipher_post,
delete_cipher_post_admin,
delete_cipher,
delete_cipher_admin,
delete_cipher_selected,
delete_cipher_selected_post,
delete_all,