diff --git a/src/model/planned_event.rs b/src/model/planned_event.rs index ae7dfa4..e29f36e 100644 --- a/src/model/planned_event.rs +++ b/src/model/planned_event.rs @@ -26,7 +26,7 @@ pub struct PlannedEvent { is_locked: bool, } -#[derive(Serialize)] +#[derive(Serialize, Debug)] pub struct PlannedEventWithUserAndTriptype { #[serde(flatten)] pub planned_event: PlannedEvent, diff --git a/src/model/user.rs b/src/model/user.rs index 068fc05..fe570f2 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -289,7 +289,7 @@ ORDER BY last_access DESC } } - for date in TripDetails::pinned_days(db, self.amount_days_to_show()).await { + for date in TripDetails::pinned_days(db, self.amount_days_to_show() - 1).await { if self.is_guest { let day = Day::new_guest(db, date, true).await; if !day.planned_events.is_empty() {