mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 10:56:29 +03:00
Remove the need for a directory for db export
Plus on import use the context directory. We can actually write there just fine.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
use std::collections::BTreeMap;
|
||||
use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
use std::{collections::HashMap, str::FromStr};
|
||||
|
||||
@@ -1351,10 +1350,10 @@ impl CommandApi {
|
||||
/// This **stops IO**. After completion `start_io` must be called to restart IO.
|
||||
///
|
||||
/// Returns the QR code as a rendered SVG image.
|
||||
async fn provide_backup(&self, account_id: u32, path: String) -> Result<String> {
|
||||
async fn provide_backup(&self, account_id: u32) -> Result<String> {
|
||||
let ctx = self.get_context(account_id).await?;
|
||||
ctx.stop_io().await;
|
||||
let provider = imex::BackupProvider::prepare(&ctx, Path::new(&path)).await?;
|
||||
let provider = imex::BackupProvider::prepare(&ctx).await?;
|
||||
let qr = provider.qr();
|
||||
let svg = match generate_backup_qr(&ctx, &qr).await {
|
||||
Ok(svg) => svg,
|
||||
|
||||
Reference in New Issue
Block a user