mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-14 14:50:08 +00:00
Fix FolderCipher creation, handle some errors
This commit is contained in:
parent
514a372bc8
commit
c3be1b4298
3 changed files with 12 additions and 8 deletions
|
@ -163,10 +163,10 @@ impl Cipher {
|
|||
current_folder.delete(&conn).or(Err("Failed removing old folder mapping"))
|
||||
},
|
||||
None => Ok(()) // Weird, but nothing to do
|
||||
};
|
||||
|
||||
FolderCipher::new(&new_folder, &self.uuid)
|
||||
.save(&conn).or(Err("Couldn't save folder setting"))
|
||||
}.and_then(
|
||||
|()| FolderCipher::new(&new_folder, &self.uuid)
|
||||
.save(&conn).or(Err("Couldn't save folder setting"))
|
||||
)
|
||||
}
|
||||
},
|
||||
None => {
|
||||
|
|
|
@ -55,10 +55,10 @@ impl Folder {
|
|||
}
|
||||
|
||||
impl FolderCipher {
|
||||
pub fn new(cipher_uuid: &str, folder_uuid: &str) -> Self {
|
||||
pub fn new(folder_uuid: &str, cipher_uuid: &str) -> Self {
|
||||
Self {
|
||||
cipher_uuid: cipher_uuid.to_string(),
|
||||
folder_uuid: folder_uuid.to_string(),
|
||||
cipher_uuid: cipher_uuid.to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue