diff options
-rw-r--r-- | src/models/screening.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/models/screening.rs b/src/models/screening.rs index feb98cc..b513362 100644 --- a/src/models/screening.rs +++ b/src/models/screening.rs @@ -35,7 +35,7 @@ pub struct NewScreening { #[derive(Deserialize, Identifiable, PartialEq, Serialize, Queryable)] #[table_name = "screenings"] -pub struct ScreeningRecord { +pub struct Screening { pub id: i32, pub film_id: i32, pub room_id: i32, @@ -56,7 +56,7 @@ pub struct AggregatedScreening { } impl AggregatedScreening { - pub fn from_query(s: Vec<(ScreeningRecord, Option<Film>, Option<Room>)>) -> Vec<AggregatedScreening> { + pub fn from_query(s: Vec<(Screening, Option<Film>, Option<Room>)>) -> Vec<AggregatedScreening> { s.iter().map(|(s, f, r)| { AggregatedScreening { id: s.id, |