Better name for main login route. Remove unused feature from main.
This commit is contained in:
parent
3dac266478
commit
42ff4c0b31
|
@ -1 +0,0 @@
|
||||||
jeff@seraph.8565:1606079828
|
|
|
@ -1,4 +1,4 @@
|
||||||
#![feature(proc_macro_hygiene, decl_macro, never_type, unsized_locals)]
|
#![feature(proc_macro_hygiene, decl_macro, never_type)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate rocket;
|
extern crate rocket;
|
||||||
|
|
|
@ -6,7 +6,7 @@ use rocket_contrib::templates::Template;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
pub(crate) fn routes() -> Vec<rocket::Route> {
|
pub(crate) fn routes() -> Vec<rocket::Route> {
|
||||||
routes![login, logout, login_user, login_page]
|
routes![login, logout, logged_in_user, login_page]
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(FromForm)]
|
#[derive(FromForm)]
|
||||||
|
@ -35,7 +35,7 @@ fn logout(mut cookies: Cookies) -> Flash<Redirect> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/login")]
|
#[get("/login")]
|
||||||
fn login_user(_user: User) -> Redirect {
|
fn logged_in_user(_user: User) -> Redirect {
|
||||||
Redirect::to(uri!(super::root::index))
|
Redirect::to(uri!(super::root::index))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue