diff --git a/src/bin/update_data.rs b/src/bin/update_data.rs index 1f302fa..d9c683f 100644 --- a/src/bin/update_data.rs +++ b/src/bin/update_data.rs @@ -137,13 +137,12 @@ async fn get_skynet(db: &Pool, config: &Config) { let url = format!("{}/ldap/discord?auth={}", &config.ldap_api, &config.auth); if let Ok(result) = surf::get(url).recv_json::>().await { for user in result { - add_users_skynet(db, &config.skynet_server, &user).await; + add_users_skynet(db, &user).await; } } } -// TODO: Tidy up -async fn add_users_skynet(db: &Pool, server: &GuildId, user: &SkynetResult) { +async fn add_users_skynet(db: &Pool, user: &SkynetResult) { match sqlx::query_as::<_, Wolves>( " UPDATE wolves @@ -158,7 +157,7 @@ async fn add_users_skynet(db: &Pool, server: &GuildId, user: &SkynetResu { Ok(_) => {} Err(e) => { - println!("Failure to insert into {} {:?}", server.as_u64(), user); + println!("Failure to insert skynet user into database {:?}", user); println!("{:?}", e); } } @@ -206,7 +205,7 @@ async fn add_users_wolves(db: &Pool, server: &GuildId, user: &WolvesResu { Ok(_) => {} Err(e) => { - println!("Failure to insert into Wolves {} {:?}", server.as_u64(), user); + println!("Failure to insert into Wolves {:?}", user); println!("{:?}", e); } }