Now the json in /export is created on a sepparate thread
This commit is contained in:
parent
fba2bb0b86
commit
7ece22c081
@ -51,7 +51,7 @@ async fn get_master_pass(
|
|||||||
|
|
||||||
accounts.sort_unstable_by(|this, other| this.name.cmp(&other.name));
|
accounts.sort_unstable_by(|this, other| this.name.cmp(&other.name));
|
||||||
|
|
||||||
let json = serde_json::to_vec_pretty(&User { accounts })?;
|
let json = spawn_blocking(move || serde_json::to_vec_pretty(&User { accounts })).await??;
|
||||||
let file = InputFile::memory(json).file_name("accounts.json");
|
let file = InputFile::memory(json).file_name("accounts.json");
|
||||||
|
|
||||||
bot.send_document(msg.chat.id, file)
|
bot.send_document(msg.chat.id, file)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user