Skip to content

Commit

Permalink
Mock exports (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hinton authored Dec 7, 2023
1 parent f9f1e5a commit 6602110
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions crates/bitwarden/src/tool/exporters/client_exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub struct ClientExporters<'a> {
}

impl<'a> ClientExporters<'a> {
/// **Draft:** Export the vault as a CSV, JSON, or encrypted JSON file.
pub async fn export_vault(
&self,
folders: Vec<Folder>,
Expand Down
9 changes: 7 additions & 2 deletions crates/bitwarden/src/tool/exporters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ pub enum ExportFormat {
pub(super) fn export_vault(
_folders: Vec<Folder>,
_ciphers: Vec<Cipher>,
_format: ExportFormat,
format: ExportFormat,
) -> Result<String> {
todo!();
Ok(match format {
ExportFormat::Csv => "Csv".to_owned(),
ExportFormat::Json => "Json".to_owned(),
ExportFormat::AccountEncryptedJson => "AccountEncryptedJson".to_owned(),
ExportFormat::EncryptedJson { .. } => "EncryptedJson".to_owned(),
})
}

pub(super) fn export_organization_vault(
Expand Down

0 comments on commit 6602110

Please sign in to comment.