Better name for main login route. Remove unused feature from main.

This commit is contained in:
jeff 2020-12-03 19:35:45 +00:00
parent 7cb8a589ad
commit ea506ab54b
3 changed files with 3 additions and 4 deletions

View File

@ -1 +0,0 @@
jeff@seraph.8565:1606079828

View File

@ -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;

View File

@ -6,7 +6,7 @@ use rocket_contrib::templates::Template;
use std::collections::HashMap;
pub(crate) fn routes() -> Vec<rocket::Route> {
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<Redirect> {
}
#[get("/login")]
fn login_user(_user: User) -> Redirect {
fn logged_in_user(_user: User) -> Redirect {
Redirect::to(uri!(super::root::index))
}