forked from Skynet/discord-bot
fix: was not recreating the empty whitelist before refreshing
This commit is contained in:
parent
bbd55202bd
commit
7e6d892b67
1 changed files with 3 additions and 0 deletions
|
@ -739,6 +739,9 @@ pub async fn update_whitelist(add: &Vec<String>, server: &str, token: &str, wipe
|
||||||
};
|
};
|
||||||
post(&format!("{url_base}/files/delete"), &bearer, &deletion).await;
|
post(&format!("{url_base}/files/delete"), &bearer, &deletion).await;
|
||||||
|
|
||||||
|
// recreate teh file, passing in the type here so the compiler knows what type of vec it is
|
||||||
|
post::<Vec<&str>>(&format!("{url_base}/files/write?file=%2Fwhitelist.json"), &bearer, &vec![]).await;
|
||||||
|
|
||||||
// reload the whitelist
|
// reload the whitelist
|
||||||
let data = BodyCommand {
|
let data = BodyCommand {
|
||||||
command: "whitelist reload".to_string(),
|
command: "whitelist reload".to_string(),
|
||||||
|
|
Loading…
Reference in a new issue