fix: was not recreating the empty whitelist before refreshing

This commit is contained in:
silver 2024-03-04 22:43:52 +00:00
parent bbd55202bd
commit 7e6d892b67

View file

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