aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2018-01-20 15:46:44 +0100
committerHarald Eilertsen <haraldei@anduin.net>2018-01-20 15:46:44 +0100
commit8a30e06af2359917a671b389b13194f455965b03 (patch)
tree1a7e847da1a48a7d0ff2dc64a6b060d9ecd6315d /src/main.rs
parent178a9f444b5250a5b76d3d1a98297da8572a05e5 (diff)
downloadrocket-blog-8a30e06af2359917a671b389b13194f455965b03.tar.gz
rocket-blog-8a30e06af2359917a671b389b13194f455965b03.tar.bz2
rocket-blog-8a30e06af2359917a671b389b13194f455965b03.zip
Add simple unfinished login controller.
It will not actually log you in yet, but will check email/password and report back if it is good or not. More tbd.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 88aa160..6fa552f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -17,7 +17,7 @@ mod models;
mod schema;
mod controllers;
use controllers::home_controller;
-use controllers::{posts_controller, users_controller};
+use controllers::{login_controller, posts_controller, users_controller};
fn main() {
if let Ok(dburl) = dotenv::var("DATABASE_URL") {
@@ -41,6 +41,11 @@ fn main() {
users_controller::new,
users_controller::create,
])
+ .mount("/login",
+ routes![
+ login_controller::new,
+ login_controller::create,
+ ])
.launch();
}
else {