parent
00ac57de63
commit
0b397369d1
1 changed files with 10 additions and 1 deletions
|
@ -98,9 +98,18 @@ async fn update_ldap(config: &Config, db: &Pool<Sqlite>) {
|
|||
}
|
||||
impl From<&WolvesResultUser> for AccountWolves {
|
||||
fn from(input: &WolvesResultUser) -> Self {
|
||||
let id_student = match input.student_id.to_owned() {
|
||||
None => {
|
||||
Some("00000000".to_string())
|
||||
}
|
||||
Some(x) => {
|
||||
Some(x)
|
||||
}
|
||||
};
|
||||
|
||||
AccountWolves {
|
||||
id_wolves: input.member_id.parse::<i64>().unwrap_or(0),
|
||||
id_student: input.student_id.to_owned(),
|
||||
id_student,
|
||||
email: input.contact_email.to_owned(),
|
||||
expiry: input.expiry.to_owned(),
|
||||
name_first: Some(input.first_name.to_owned()),
|
||||
|
|
Loading…
Reference in a new issue