mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-22 17:59:20 -07:00
Remove dependent items when removing cipher
This commit is contained in:
@@ -204,4 +204,10 @@ impl CollectionCipher {
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn delete_all_by_cipher(cipher_uuid: &str, conn: &DbConn) -> QueryResult<()> {
|
||||
diesel::delete(ciphers_collections::table
|
||||
.filter(ciphers_collections::cipher_uuid.eq(cipher_uuid))
|
||||
).execute(&**conn).and(Ok(()))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user