mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-24 00:00:16 +02:00
Remove the associated Body type on IntoResponse (#571)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
use async_session::{MemoryStore, Session, SessionStore};
|
||||
use axum::{
|
||||
async_trait,
|
||||
body::{Bytes, Empty},
|
||||
body::BoxBody,
|
||||
extract::{Extension, FromRequest, Query, RequestParts, TypedHeader},
|
||||
http::{header::SET_COOKIE, HeaderMap, Response},
|
||||
response::{IntoResponse, Redirect},
|
||||
@@ -199,10 +199,7 @@ async fn login_authorized(
|
||||
struct AuthRedirect;
|
||||
|
||||
impl IntoResponse for AuthRedirect {
|
||||
type Body = Empty<Bytes>;
|
||||
type BodyError = <Self::Body as axum::body::HttpBody>::Error;
|
||||
|
||||
fn into_response(self) -> Response<Self::Body> {
|
||||
fn into_response(self) -> Response<BoxBody> {
|
||||
Redirect::found("/auth/discord".parse().unwrap()).into_response()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user