From 18fbb7fa5f4f1f5a0cdc429de1b5eb02655d447c Mon Sep 17 00:00:00 2001 From: notplants Date: Mon, 8 Nov 2021 16:54:18 +0100 Subject: [PATCH] Fix typos --- peach-web/src/routes/authentication.rs | 6 ++---- peach-web/src/routes/catchers.rs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/peach-web/src/routes/authentication.rs b/peach-web/src/routes/authentication.rs index 1e324c6..9bcdf2d 100644 --- a/peach-web/src/routes/authentication.rs +++ b/peach-web/src/routes/authentication.rs @@ -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)) } } } diff --git a/peach-web/src/routes/catchers.rs b/peach-web/src/routes/catchers.rs index e494395..a096cac 100644 --- a/peach-web/src/routes/catchers.rs +++ b/peach-web/src/routes/catchers.rs @@ -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 {