Skip to content

Commit

Permalink
fix: make steam config optional
Browse files Browse the repository at this point in the history
The update library job will no longer error when
the optional steam config is not specified.

fixes: #205
  • Loading branch information
JMBeresford committed Dec 24, 2024
1 parent ba8faff commit ab0b644
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/service/src/providers/steam/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,11 @@ impl SteamWebApiProvider {
let mut url = reqwest::Url::from_str(&path).expect("Invalid Base URL");
let config = self.config_manager.get_config().await;

let user = config.steam.expect("No Steam Config");
let user = match config.steam {
Some(steam) => steam,
None => return Err(reqwest::StatusCode::UNAUTHORIZED),
};

url.query_pairs_mut().append_pair("key", &user.api_key);
url.query_pairs_mut().append_pair("steamid", &user.user_id);
url.query_pairs_mut()
Expand Down

0 comments on commit ab0b644

Please sign in to comment.