mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-10-24 23:26:49 +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
@@ -117,6 +117,12 @@ impl FolderCipher {
|
||||
).execute(&**conn).and(Ok(()))
|
||||
}
|
||||
|
||||
pub fn delete_all_by_cipher(cipher_uuid: &str, conn: &DbConn) -> QueryResult<()> {
|
||||
diesel::delete(folders_ciphers::table
|
||||
.filter(folders_ciphers::cipher_uuid.eq(cipher_uuid))
|
||||
).execute(&**conn).and(Ok(()))
|
||||
}
|
||||
|
||||
pub fn find_by_folder_and_cipher(folder_uuid: &str, cipher_uuid: &str, conn: &DbConn) -> Option<Self> {
|
||||
folders_ciphers::table
|
||||
.filter(folders_ciphers::folder_uuid.eq(folder_uuid))
|
||||
|
||||
Reference in new issue
Block a user