forked from Skynet/discord-bot
feat: added some minor logging
This commit is contained in:
parent
b7d36de976
commit
a9d3af024e
2 changed files with 7 additions and 4 deletions
|
@ -328,7 +328,7 @@ pub(crate) mod server {
|
|||
ID: {id}
|
||||
Online: {online}
|
||||
Info: {description}
|
||||
Link: <http://panel.games.skynet.ie/server/{id}>
|
||||
Link: <https://panel.games.skynet.ie/server/{id}>
|
||||
"#,
|
||||
name = &x.attributes.name,
|
||||
online = !x.attributes.is_suspended,
|
||||
|
|
|
@ -774,7 +774,8 @@ struct BodyDelete {
|
|||
}
|
||||
|
||||
pub async fn whitelist_update(add: &Vec<(String, bool)>, server: &str, token: &str) {
|
||||
let url_base = format!("http://panel.games.skynet.ie/api/client/servers/{server}");
|
||||
println!("Update whitelist for {}", server);
|
||||
let url_base = format!("https://panel.games.skynet.ie/api/client/servers/{server}");
|
||||
let bearer = format!("Bearer {token}");
|
||||
|
||||
for (name, java) in add {
|
||||
|
@ -792,7 +793,8 @@ pub async fn whitelist_update(add: &Vec<(String, bool)>, server: &str, token: &s
|
|||
}
|
||||
|
||||
pub async fn whitelist_wipe(server: &str, token: &str) {
|
||||
let url_base = format!("http://panel.games.skynet.ie/api/client/servers/{server}");
|
||||
println!("Wiping whitelist for {}", server);
|
||||
let url_base = format!("https://panel.games.skynet.ie/api/client/servers/{server}");
|
||||
let bearer = format!("Bearer {token}");
|
||||
|
||||
// delete whitelist
|
||||
|
@ -813,7 +815,8 @@ pub async fn whitelist_wipe(server: &str, token: &str) {
|
|||
}
|
||||
|
||||
pub async fn server_information(server: &str, token: &str) -> Option<ServerDetailsRes> {
|
||||
let url_base = format!("http://panel.games.skynet.ie/api/client/servers/{server}");
|
||||
println!("Get server information for {}", server);
|
||||
let url_base = format!("https://panel.games.skynet.ie/api/client/servers/{server}");
|
||||
let bearer = format!("Bearer {token}");
|
||||
get::<ServerDetailsRes>(&format!("{url_base}/"), &bearer).await
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue