Add an accommodations reservations module #188

Merged
pierre merged 81 commits from accomodation_module into master 2024-06-22 21:30:26 +00:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 04d6f1318f - Show all commits

View File

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

View File

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