mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-09 01:30:18 +00:00
feat: check if portfolio is complete
This commit is contained in:
parent
4a8c520cae
commit
91125ce7f1
1 changed files with 14 additions and 0 deletions
|
|
@ -124,6 +124,20 @@ impl CandidateService {
|
||||||
Self::write_portfolio_file(candidate_id, zip, "PORTFOLIO.zip").await
|
Self::write_portfolio_file(candidate_id, zip, "PORTFOLIO.zip").await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub async fn is_portfolio_complete(candidate_id: i32) -> bool {
|
||||||
|
let cache_path = Path::new(&candidate_id.to_string()).join("cache");
|
||||||
|
|
||||||
|
tokio::fs::metadata(cache_path.join("MOTIVACNI_DOPIS.pdf"))
|
||||||
|
.await
|
||||||
|
.is_ok()
|
||||||
|
&& tokio::fs::metadata(cache_path.join("PORTFOLIO.pdf"))
|
||||||
|
.await
|
||||||
|
.is_ok()
|
||||||
|
&& tokio::fs::metadata(cache_path.join("PORTFOLIO.zip"))
|
||||||
|
.await
|
||||||
|
.is_ok()
|
||||||
|
}
|
||||||
|
|
||||||
async fn decrypt_private_key(
|
async fn decrypt_private_key(
|
||||||
candidate: candidate::Model,
|
candidate: candidate::Model,
|
||||||
password: String,
|
password: String,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue