Fix typos
This commit is contained in:
parent
04011e4f1a
commit
18fbb7fa5f
|
@ -30,9 +30,7 @@ pub struct Authenticated {
|
|||
|
||||
#[derive(Debug)]
|
||||
pub enum LoginError {
|
||||
InvalidData,
|
||||
UsernameDoesNotExist,
|
||||
WrongPassword
|
||||
UserNotLoggedIn
|
||||
}
|
||||
|
||||
/// Request guard which returns an Authenticated struct with is_authenticated=true
|
||||
|
@ -55,7 +53,7 @@ impl<'r> FromRequest<'r> for Authenticated {
|
|||
request::Outcome::Success(auth)
|
||||
},
|
||||
None => {
|
||||
request::Outcome::Failure((Status::Forbidden, LoginError::UsernameDoesNotExist))
|
||||
request::Outcome::Failure((Status::Forbidden, LoginError::UserNotLoggedIn))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ pub fn internal_error() -> Template {
|
|||
Template::render("internal_error", context)
|
||||
}
|
||||
|
||||
// HELPERS AND ROUNTES FOR 403 FORBIDDEN
|
||||
// HELPERS AND ROUTES FOR 403 FORBIDDEN
|
||||
|
||||
#[catch(403)]
|
||||
pub fn forbidden() -> Redirect {
|
||||
|
|
Loading…
Reference in New Issue