From 7e6d892b67440d161f4d94ad3cd589fd79da90ea Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Mon, 4 Mar 2024 22:43:52 +0000 Subject: [PATCH] fix: was not recreating the empty whitelist before refreshing --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 6f0e5ce..ef0e674 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -739,6 +739,9 @@ pub async fn update_whitelist(add: &Vec, server: &str, token: &str, wipe }; 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::>(&format!("{url_base}/files/write?file=%2Fwhitelist.json"), &bearer, &vec![]).await; + // reload the whitelist let data = BodyCommand { command: "whitelist reload".to_string(),