From 8a30e06af2359917a671b389b13194f455965b03 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 20 Jan 2018 15:46:44 +0100 Subject: 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. --- src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main.rs') 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 { -- cgit v1.2.3