fix: aoc request cookies
This commit is contained in:
@@ -57,7 +57,7 @@ impl LeaderboardState {
|
||||
/// Fetches the leaderboard and returns the instant when the cached response expires. Failures
|
||||
/// are also cached for their own amount of time.
|
||||
async fn fetch_params(
|
||||
params: crate::config::AdventConfig,
|
||||
params: &crate::config::AdventConfig,
|
||||
) -> (Instant, LeaderboardWatchedInfo) {
|
||||
match params.fetch().await {
|
||||
Ok(data) => (
|
||||
@@ -78,7 +78,7 @@ impl LeaderboardState {
|
||||
}
|
||||
|
||||
pub async fn new(params: crate::config::AdventConfig) -> Self {
|
||||
let (init_expiry, info) = Self::fetch_params(params).await;
|
||||
let (init_expiry, info) = Self::fetch_params(¶ms).await;
|
||||
let info = watch::Sender::new(info);
|
||||
|
||||
let listener_attach = Arc::new(Notify::new());
|
||||
@@ -96,7 +96,7 @@ impl LeaderboardState {
|
||||
}
|
||||
|
||||
eprintln!("trace: updating cached object");
|
||||
let (new_expiry, new_params) = Self::fetch_params(params).await;
|
||||
let (new_expiry, new_params) = Self::fetch_params(¶ms).await;
|
||||
next_expiry = new_expiry;
|
||||
_ = sender.send_replace(new_params); // returns previous
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user