From ea506ab54b7542dbb55d25e31adf20cf7d018b05 Mon Sep 17 00:00:00 2001 From: jeff Date: Thu, 3 Dec 2020 19:35:45 +0000 Subject: [PATCH] Better name for main login route. Remove unused feature from main. --- src/.#main.rs | 1 - src/main.rs | 2 +- src/routes/auth.rs | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) delete mode 120000 src/.#main.rs diff --git a/src/.#main.rs b/src/.#main.rs deleted file mode 120000 index 64c769c..0000000 --- a/src/.#main.rs +++ /dev/null @@ -1 +0,0 @@ -jeff@seraph.8565:1606079828 \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index ed082c3..5d3ca8a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -#![feature(proc_macro_hygiene, decl_macro, never_type, unsized_locals)] +#![feature(proc_macro_hygiene, decl_macro, never_type)] #[macro_use] extern crate rocket; diff --git a/src/routes/auth.rs b/src/routes/auth.rs index 0cc4ee4..a675709 100644 --- a/src/routes/auth.rs +++ b/src/routes/auth.rs @@ -6,7 +6,7 @@ use rocket_contrib::templates::Template; use std::collections::HashMap; pub(crate) fn routes() -> Vec { - routes![login, logout, login_user, login_page] + routes![login, logout, logged_in_user, login_page] } #[derive(FromForm)] @@ -35,7 +35,7 @@ fn logout(mut cookies: Cookies) -> Flash { } #[get("/login")] -fn login_user(_user: User) -> Redirect { +fn logged_in_user(_user: User) -> Redirect { Redirect::to(uri!(super::root::index)) }