mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-10-24 08:46:40 +03:00
Remove dependent items when removing cipher
This commit is contained in:
1 parent
1e812c0a23
commit
21c1ab7fda
6 files changed
+51
-32
No files matched your search
@@ -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