mirror of
https://github.com/danbulant/Portfolio
synced 2026-07-05 11:00:56 +00:00
feat: add fieldOfStudy to backend response
This commit is contained in:
parent
b44ce9c559
commit
ed53640263
2 changed files with 3 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ pub struct ApplicationCandidateJoin {
|
||||||
pub surname: Option<String>,
|
pub surname: Option<String>,
|
||||||
pub email: Option<String>,
|
pub email: Option<String>,
|
||||||
pub telephone: Option<String>,
|
pub telephone: Option<String>,
|
||||||
|
pub field_of_study: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
use crate::{Query};
|
use crate::{Query};
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ pub struct ApplicationResponse {
|
||||||
pub surname: String,
|
pub surname: String,
|
||||||
pub email: String,
|
pub email: String,
|
||||||
pub telephone: String,
|
pub telephone: String,
|
||||||
|
pub field_of_study: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ApplicationResponse {
|
impl ApplicationResponse {
|
||||||
|
|
@ -25,7 +26,6 @@ impl ApplicationResponse {
|
||||||
let surname = EncryptedString::decrypt_option(&EncryptedString::try_from(&c.surname).ok(), private_key).await?;
|
let surname = EncryptedString::decrypt_option(&EncryptedString::try_from(&c.surname).ok(), private_key).await?;
|
||||||
let email = EncryptedString::decrypt_option(&EncryptedString::try_from(&c.email).ok(), private_key).await?;
|
let email = EncryptedString::decrypt_option(&EncryptedString::try_from(&c.email).ok(), private_key).await?;
|
||||||
let telephone = EncryptedString::decrypt_option(&EncryptedString::try_from(&c.telephone).ok(), private_key).await?;
|
let telephone = EncryptedString::decrypt_option(&EncryptedString::try_from(&c.telephone).ok(), private_key).await?;
|
||||||
|
|
||||||
Ok(
|
Ok(
|
||||||
Self {
|
Self {
|
||||||
application_id: c.application_id,
|
application_id: c.application_id,
|
||||||
|
|
@ -34,6 +34,7 @@ impl ApplicationResponse {
|
||||||
email: email.unwrap_or_default(),
|
email: email.unwrap_or_default(),
|
||||||
telephone: telephone.unwrap_or_default(),
|
telephone: telephone.unwrap_or_default(),
|
||||||
candidate_id: c.candidate_id,
|
candidate_id: c.candidate_id,
|
||||||
|
field_of_study: c.field_of_study,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue