Fix typos

This commit is contained in:
notplants 2021-11-08 16:54:18 +01:00
parent 04011e4f1a
commit 18fbb7fa5f
2 changed files with 3 additions and 5 deletions

View File

@ -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))
}
}
}

View File

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