refactor reqwest client suite w/ conf items.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-03-16 15:54:58 -07:00 committed by June
parent 61b1d6d869
commit 9334f938ae
7 changed files with 173 additions and 96 deletions

View file

@ -1058,7 +1058,7 @@ impl KeyValueDatabase {
async fn try_handle_updates() -> Result<()> {
let response =
services().globals.default_client().get("https://pupbrain.dev/check-for-updates/stable").send().await?;
services().globals.client.default.get("https://pupbrain.dev/check-for-updates/stable").send().await?;
let response = serde_json::from_str::<CheckForUpdatesResponse>(&response.text().await?).map_err(|e| {
error!("Bad check for updates response: {e}");