diff options
Diffstat (limited to 'src/login/extract.rs')
| -rw-r--r-- | src/login/extract.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/login/extract.rs b/src/login/extract.rs index b585565..bfdbe8d 100644 --- a/src/login/extract.rs +++ b/src/login/extract.rs @@ -2,7 +2,7 @@ use std::fmt; use axum::{ extract::{FromRequestParts, State}, - http::{request::Parts, StatusCode}, + http::request::Parts, response::{IntoResponse, IntoResponseParts, Response, ResponseParts}, }; use axum_extra::extract::cookie::{Cookie, CookieJar}; @@ -10,7 +10,7 @@ use axum_extra::extract::cookie::{Cookie, CookieJar}; use crate::{ app::App, clock::RequestedAt, - error::Internal, + error::{Internal, Unauthorized}, login::app::ValidateError, repo::{login::Login, token}, }; @@ -166,7 +166,7 @@ where { fn into_response(self) -> Response { match self { - Self::Unauthorized => (StatusCode::UNAUTHORIZED, "unauthorized").into_response(), + Self::Unauthorized => Unauthorized.into_response(), Self::Failure(e) => e.into_response(), } } |
