mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-08-30 06:24:47 +00:00
Finished work on ciphers (import, update, and the missing types)
This commit is contained in:
parent
84a75c871b
commit
7a3308200a
4 changed files with 113 additions and 62 deletions
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue