diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -23,7 +23,7 @@ mod controllers; pub mod db; pub mod models; pub mod schema; -use crate::controllers::{film, room, screening}; +use crate::controllers::{event, film, room, screening}; use rocket::routes; use std::error::Error; @@ -33,7 +33,11 @@ pub fn build_rocket() -> Result<rocket::Rocket, Box<dyn Error>> { Ok(rocket::ignite() .attach(db::Connection::fairing()) .attach(rocket_contrib::templates::Template::fairing()) - .mount("/", rocket_contrib::serve::StaticFiles::from("./public")) + .mount("/", routes![ + event::index, + event::new, + event::create, + ]) .mount("/rooms", routes![room::get_rooms_json, room::list_rooms, room::new_room, room::create_room]) .mount("/films", routes![film::get_films_json, film::list_films, film::new_film, film::create_film]) .mount("/screenings", routes![ |