feat: wolves is making a change to their API

This commit is contained in:
silver 2024-03-28 12:41:08 +00:00
parent 44acc7378d
commit c1b42a8132

View file

@ -99,7 +99,7 @@ async fn update_ldap(config: &Config, db: &Pool<Sqlite>) {
impl From<&WolvesResultUser> for AccountWolves { impl From<&WolvesResultUser> for AccountWolves {
fn from(input: &WolvesResultUser) -> Self { fn from(input: &WolvesResultUser) -> Self {
AccountWolves { AccountWolves {
id_wolves: input.wolves_id.parse::<i64>().unwrap_or(0), id_wolves: input.member_id.parse::<i64>().unwrap_or(0),
id_student: input.student_id.to_owned(), id_student: input.student_id.to_owned(),
email: input.contact_email.to_owned(), email: input.contact_email.to_owned(),
expiry: input.expiry.to_owned(), expiry: input.expiry.to_owned(),
@ -112,7 +112,7 @@ impl From<&WolvesResultUser> for AccountWolves {
#[derive(Deserialize, Serialize, Debug)] #[derive(Deserialize, Serialize, Debug)]
struct WolvesResultUser { struct WolvesResultUser {
committee: String, committee: String,
wolves_id: String, member_id: String,
first_name: String, first_name: String,
last_name: String, last_name: String,
contact_email: String, contact_email: String,