aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 109d7d1..0bbdc2e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -17,7 +17,8 @@ use rocket_contrib::Json;
#[macro_use] mod utils;
mod models;
mod schema;
-mod posts;
+mod controllers;
+use controllers::posts_controller;
#[derive(BartDisplay, Serialize)]
#[template = "templates/index.html"]
@@ -42,6 +43,12 @@ fn main() {
rocket::ignite()
.manage(utils::init_db_pool())
.mount("/", routes![index, index_json])
- .mount("/posts", routes![posts::new, posts::create, posts::show, posts::edit, posts::update])
+ .mount("/posts",
+ routes![
+ posts_controller::new,
+ posts_controller::create,
+ posts_controller::show,
+ posts_controller::edit,
+ posts_controller::update])
.launch();
}