Fix constant name
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Pierre HUBERT 2024-06-22 23:24:40 +02:00
parent 04d6f1318f
commit 0fef44ce0e
2 changed files with 5 additions and 2 deletions

View File

@ -147,4 +147,5 @@ pub const THUMB_HEIGHT: u32 = 350;
pub const ACCOMMODATIONS_RESERVATIONS_CALENDARS_TOKENS_LEN: usize = 50;
/// Minimum interval before calendar used time update
pub const CAL_URL_TIME_USED_UPDATE_MIN_INTERVAL: Duration = Duration::from_secs(60);
pub const ACCOMMODATIONS_RESERVATIONS_CAL_URL_TIME_USED_UPDATE_MIN_INTERVAL: Duration =
Duration::from_secs(60);

View File

@ -579,7 +579,9 @@ impl AccommodationReservationCalendar {
}
pub fn should_update_last_used(&self) -> bool {
(self.time_used + constants::CAL_URL_TIME_USED_UPDATE_MIN_INTERVAL.as_secs() as i64)
(self.time_used
+ constants::ACCOMMODATIONS_RESERVATIONS_CAL_URL_TIME_USED_UPDATE_MIN_INTERVAL.as_secs()
as i64)
< time() as i64
}
}