mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-07-24 13:00:39 +00:00
Remove dependent items when removing cipher
This commit is contained in:
parent
1e812c0a23
commit
21c1ab7fda
6 changed files with 51 additions and 32 deletions
|
@ -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(()))
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue