mirror of
https://github.com/danbulant/Portfolio
synced 2026-07-07 20:10:44 +00:00
feat: is_set_up method
This commit is contained in:
parent
a575556bdd
commit
23c1a890c0
1 changed files with 15 additions and 0 deletions
|
|
@ -293,6 +293,21 @@ impl CandidateService {
|
||||||
enc_details.decrypt(dec_priv_key).await
|
enc_details.decrypt(dec_priv_key).await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub async fn is_set_up(
|
||||||
|
candidate: &candidate::Model,
|
||||||
|
) -> bool {
|
||||||
|
candidate.name.is_some() &&
|
||||||
|
candidate.surname.is_some() &&
|
||||||
|
candidate.birthplace.is_some() &&
|
||||||
|
// birthdate: NaiveDate::from_ymd(2000, 1, 1),
|
||||||
|
candidate.address.is_some() &&
|
||||||
|
candidate.telephone.is_some() &&
|
||||||
|
candidate.citizenship.is_some() &&
|
||||||
|
candidate.email.is_some() &&
|
||||||
|
candidate.sex.is_some() &&
|
||||||
|
candidate.study.is_some()
|
||||||
|
}
|
||||||
|
|
||||||
pub async fn login(
|
pub async fn login(
|
||||||
db: &DbConn,
|
db: &DbConn,
|
||||||
user_id: i32,
|
user_id: i32,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue