From fa6920e4a31f0910273ae11ba790f7ded1edb709 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Sun, 17 Sep 2023 18:09:02 +0100 Subject: [PATCH] fix: no need to have this being passed in here --- src/bin/update_data.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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); } }