This commit is contained in:
Kumar Ankur
2018-08-10 23:49:34 +05:30
parent 7b2de40beb
commit 3fd3d8d5e9
3 changed files with 5 additions and 68 deletions

View File

@@ -111,10 +111,4 @@ impl Attachment {
.filter(attachments::cipher_uuid.eq(cipher_uuid))
.load::<Self>(&**conn).expect("Error loading attachments")
}
pub fn find_by_ciphers(cipher_uuids: Vec<String>, conn: &DbConn) -> Vec<Self> {
attachments::table
.filter(attachments::cipher_uuid.eq_any(cipher_uuids))
.load::<Self>(&**conn).expect("Error loading attachments")
}
}