diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2020-08-25 16:12:16 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2020-08-25 16:12:16 +0200 |
commit | 639eb16af544ea051d2e091111bcd6427a1644d0 (patch) | |
tree | de4546f8f075cc122d503a7750d989dbc87c6d3d /src/lib.rs | |
parent | ccf0703f753c66405683b17b4d1f5135c10c0ece (diff) | |
download | ramaskrik-social-639eb16af544ea051d2e091111bcd6427a1644d0.tar.gz ramaskrik-social-639eb16af544ea051d2e091111bcd6427a1644d0.tar.bz2 ramaskrik-social-639eb16af544ea051d2e091111bcd6427a1644d0.zip |
Add info about the event to the db and render landing page.
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![ |