mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-14 00:00:15 +02:00
Make extractor field public in example
This commit is contained in:
@@ -20,7 +20,7 @@ pub async fn handler(Json(value): Json<Value>) -> impl IntoResponse {
|
||||
}
|
||||
|
||||
// We define our own `Json` extractor that customizes the error from `axum::Json`
|
||||
pub struct Json<T>(T);
|
||||
pub struct Json<T>(pub T);
|
||||
|
||||
#[async_trait]
|
||||
impl<S, B, T> FromRequest<S, B> for Json<T>
|
||||
|
||||
Reference in New Issue
Block a user