mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-24 00:00:16 +02:00
Introduce Response type alias as a shorthand for Response<BoxBody> (#590)
* Introduce `Response` type alias as a shorthand * Don't re-export `Response` at the crate root
This commit is contained in:
@@ -9,10 +9,9 @@
|
||||
use async_session::{MemoryStore, Session, SessionStore};
|
||||
use axum::{
|
||||
async_trait,
|
||||
body::BoxBody,
|
||||
extract::{Extension, FromRequest, Query, RequestParts, TypedHeader},
|
||||
http::{header::SET_COOKIE, HeaderMap, Response},
|
||||
response::{IntoResponse, Redirect},
|
||||
http::{header::SET_COOKIE, HeaderMap},
|
||||
response::{IntoResponse, Redirect, Response},
|
||||
routing::get,
|
||||
AddExtensionLayer, Router,
|
||||
};
|
||||
@@ -199,7 +198,7 @@ async fn login_authorized(
|
||||
struct AuthRedirect;
|
||||
|
||||
impl IntoResponse for AuthRedirect {
|
||||
fn into_response(self) -> Response<BoxBody> {
|
||||
fn into_response(self) -> Response {
|
||||
Redirect::found("/auth/discord".parse().unwrap()).into_response()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user