fix: better logging to figure out teh issue on the backend

This commit is contained in:
silver 2023-09-23 20:52:37 +01:00
parent 347988e113
commit e6da06ea0d

View file

@ -28,9 +28,21 @@ async fn update_wolves(config: &Config, db: &Pool<Sqlite>) {
} }
async fn update_ldap(config: &Config, db: &Pool<Sqlite>) { async fn update_ldap(config: &Config, db: &Pool<Sqlite>) {
let mut ldap = LdapConn::new(&config.ldap_host).unwrap(); let mut ldap = match LdapConn::new(&config.ldap_host){
Ok(s) => {s}
Err(e) => {
println!("{:?}", e);
return;
}
};
ldap.simple_bind(&config.ldap_admin, &config.ldap_admin_pw).unwrap().success().unwrap(); match ldap.simple_bind(&config.ldap_admin, &config.ldap_admin_pw) {
Ok(_) => {}
Err(e) => {
println!("{:?}", e);
return;
}
}
// use this to pre load a large chunk of data // use this to pre load a large chunk of data
if let Ok(x) = ldap.search( if let Ok(x) = ldap.search(