feat: added some minor logging

This commit is contained in:
silver 2025-01-03 19:58:00 +00:00
parent b7d36de976
commit a9d3af024e
Signed by untrusted user: silver
GPG key ID: 36F93D61BAD3FD7D
2 changed files with 7 additions and 4 deletions

View file

@ -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,

View file

@ -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
}