aboutsummaryrefslogtreecommitdiffstats
path: root/src/controllers
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2019-04-28 13:47:58 +0200
committerHarald Eilertsen <haraldei@anduin.net>2019-04-28 13:47:58 +0200
commitcaa7b4429e68135404ad5a01aa1d7f530abae090 (patch)
tree2f2b2331de7e126bc2552c4e285cd75f69256cf4 /src/controllers
parent30f65b62e84fcd9975643716d61fa21bc8495291 (diff)
downloadramaskrik-social-caa7b4429e68135404ad5a01aa1d7f530abae090.tar.gz
ramaskrik-social-caa7b4429e68135404ad5a01aa1d7f530abae090.tar.bz2
ramaskrik-social-caa7b4429e68135404ad5a01aa1d7f530abae090.zip
Update /screenings endpoint to return full info on screenings.
This makes each screening record self-contained, and the json payload more consistent with how it semantically fit together.
Diffstat (limited to 'src/controllers')
-rw-r--r--src/controllers/screening.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controllers/screening.rs b/src/controllers/screening.rs
index 29b6afa..a26720e 100644
--- a/src/controllers/screening.rs
+++ b/src/controllers/screening.rs
@@ -18,7 +18,7 @@
use crate::{
db,
- models::{Film, Room, Screening},
+ models::{Screening},
};
use rocket::get;
@@ -27,6 +27,6 @@ use rocket_contrib::{
};
#[get("/")]
-pub fn get_screenings(db: db::Connection) -> Json<Vec<(Screening, Option<Film>, Option<Room>)>> {
+pub fn get_screenings(db: db::Connection) -> Json<Vec<Screening>> {
Json(db.get_screenings().unwrap())
}