Remove useless pagination routes (#351)
Rocket 0.4 let us have routes with optional query parameter
This commit is contained in:
+2
-13
@@ -14,27 +14,16 @@ use plume_models::{
|
||||
users::{User, AUTH_COOKIE}
|
||||
};
|
||||
|
||||
#[get("/login")]
|
||||
pub fn new(user: Option<User>, conn: DbConn, intl: I18n) -> Ructe {
|
||||
render!(session::login(
|
||||
&(&*conn, &intl.catalog, user),
|
||||
None,
|
||||
&LoginForm::default(),
|
||||
ValidationErrors::default()
|
||||
))
|
||||
}
|
||||
|
||||
#[get("/login?<m>")]
|
||||
pub fn new_message(user: Option<User>, m: String, conn: DbConn, intl: I18n) -> Ructe {
|
||||
pub fn new(user: Option<User>, conn: DbConn, m: Option<String>, intl: I18n) -> Ructe {
|
||||
render!(session::login(
|
||||
&(&*conn, &intl.catalog, user),
|
||||
Some(m),
|
||||
m,
|
||||
&LoginForm::default(),
|
||||
ValidationErrors::default()
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
#[derive(Default, FromForm, Validate, Serialize)]
|
||||
pub struct LoginForm {
|
||||
#[validate(length(min = "1", message = "We need an email or a username to identify you"))]
|
||||
|
||||
Reference in New Issue
Block a user