aboutsummaryrefslogtreecommitdiffstats
path: root/src/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'src/controllers')
-rw-r--r--src/controllers/film.rs2
-rw-r--r--src/controllers/room.rs2
-rw-r--r--src/controllers/screening.rs4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/controllers/film.rs b/src/controllers/film.rs
index f4bcd03..e61a543 100644
--- a/src/controllers/film.rs
+++ b/src/controllers/film.rs
@@ -28,5 +28,5 @@ use rocket_contrib::{
#[get("/")]
pub fn get_films(db: db::Connection) -> Json<Vec<film::Film>> {
- Json(film::get_all(&db).unwrap())
+ Json(db.get_films().unwrap())
}
diff --git a/src/controllers/room.rs b/src/controllers/room.rs
index df77414..a203454 100644
--- a/src/controllers/room.rs
+++ b/src/controllers/room.rs
@@ -28,5 +28,5 @@ use rocket_contrib::{
#[get("/")]
pub fn get_rooms(db: db::Connection) -> Json<Vec<room::Room>> {
- Json(room::get_all(&db).unwrap())
+ Json(db.get_rooms().unwrap())
}
diff --git a/src/controllers/screening.rs b/src/controllers/screening.rs
index d060eb7..622e9cb 100644
--- a/src/controllers/screening.rs
+++ b/src/controllers/screening.rs
@@ -18,7 +18,7 @@
use crate::{
db,
- models::{screening::{self, Screening}, film::Film, room::Room},
+ models::{screening::Screening, film::Film, room::Room},
};
use rocket::get;
@@ -28,5 +28,5 @@ use rocket_contrib::{
#[get("/")]
pub fn get_screenings(db: db::Connection) -> Json<Vec<(Screening, Option<Film>, Option<Room>)>> {
- Json(screening::get_all(&db).unwrap())
+ Json(db.get_screenings().unwrap())
}