mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 12:35:31 +00:00
refactor: remove portfolio file after encrypting
This commit is contained in:
parent
dd456a7870
commit
205996cc2e
1 changed files with 4 additions and 3 deletions
|
|
@ -394,13 +394,14 @@ impl PortfolioService {
|
||||||
&private_key
|
&private_key
|
||||||
).await?;
|
).await?;
|
||||||
|
|
||||||
tokio::fs::remove_file(path.to_owned()).await?;
|
|
||||||
|
|
||||||
let enc_portfolio= crypto::encrypt_buffer_with_recipients(
|
let enc_portfolio= crypto::encrypt_buffer_with_recipients(
|
||||||
&plain_portfolio,
|
&plain_portfolio,
|
||||||
recipients
|
recipients
|
||||||
).await?;
|
).await?;
|
||||||
|
|
||||||
|
tokio::fs::remove_file(path.to_owned()).await?;
|
||||||
|
|
||||||
tokio::fs::write(path, enc_portfolio).await?;
|
tokio::fs::write(path, enc_portfolio).await?;
|
||||||
|
|
||||||
info!("PORTFOLIO {} REENCRYPT FINISHED", candidate_id);
|
info!("PORTFOLIO {} REENCRYPT FINISHED", candidate_id);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue