mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-12 21:27:37 +02:00
Finished work on ciphers (import, update, and the missing types)
This commit is contained in:
@ -18,10 +18,6 @@ pub struct Cipher {
|
||||
pub folder_uuid: Option<String>,
|
||||
pub organization_uuid: Option<String>,
|
||||
|
||||
// Login = 1,
|
||||
// SecureNote = 2,
|
||||
// Card = 3,
|
||||
// Identity = 4
|
||||
pub type_: i32,
|
||||
|
||||
pub data: String,
|
||||
@ -113,4 +109,10 @@ impl Cipher {
|
||||
.filter(ciphers::user_uuid.eq(user_uuid))
|
||||
.load::<Self>(&**conn).expect("Error loading ciphers")
|
||||
}
|
||||
|
||||
pub fn find_by_folder(folder_uuid: &str, conn: &DbConn) -> Vec<Self> {
|
||||
ciphers::table
|
||||
.filter(ciphers::folder_uuid.eq(folder_uuid))
|
||||
.load::<Self>(&**conn).expect("Error loading ciphers")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user