feat: nixos side of the config #45

Merged
silver merged 5 commits from #20_wolves-api into main 2023-10-27 01:43:38 +00:00
Showing only changes of commit b729c050f9 - Show all commits

View file

@ -139,19 +139,18 @@ async fn get_wolves(config: &Config) -> Vec<AccountWolves> {
} }
// get wolves data // get wolves data
let uri = &config.wolves_url; if let Ok(mut res) = surf::post(&config.wolves_url).header("X-AM-Identity", &config.wolves_key).await {
let mut res = surf::post(uri).header("X-AM-Identity", &config.wolves_key).await.unwrap(); if let Ok(WolvesResult {
success,
result,
}) = res.body_json().await
{
if success != 1 {
return vec![];
}
if let Ok(WolvesResult { return result.iter().map(AccountWolves::from).collect::<Vec<AccountWolves>>();
success,
result,
}) = res.body_json().await
{
if success != 1 {
return vec![];
} }
return result.iter().map(AccountWolves::from).collect::<Vec<AccountWolves>>();
} }
vec![] vec![]