mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-11 11:15:58 +03: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