diff options
Diffstat (limited to 'src/extract/json.rs')
| -rw-r--r-- | src/extract/json.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/extract/json.rs b/src/extract/json.rs index 751df71..aaf8623 100644 --- a/src/extract/json.rs +++ b/src/extract/json.rs | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | use axum::extract::{FromRequest, Request, rejection::JsonRejection}; | 1 | use axum::extract::{FromRequest, Request, rejection::JsonRejection}; |
| 2 | 2 | ||
| 3 | use crate::error::ApiError; | 3 | use crate::ErrorResponse; |
| 4 | 4 | ||
| 5 | pub struct ApiJson<T>(pub T); | 5 | pub struct ApiJson<T>(pub T); |
| 6 | 6 | ||
| @@ -9,7 +9,7 @@ where | |||
| 9 | axum::Json<T>: FromRequest<S, Rejection = JsonRejection>, | 9 | axum::Json<T>: FromRequest<S, Rejection = JsonRejection>, |
| 10 | S: Send + Sync, | 10 | S: Send + Sync, |
| 11 | { | 11 | { |
| 12 | type Rejection = ApiError; | 12 | type Rejection = ErrorResponse; |
| 13 | 13 | ||
| 14 | #[inline] | 14 | #[inline] |
| 15 | async fn from_request(req: Request, state: &S) -> Result<Self, Self::Rejection> { | 15 | async fn from_request(req: Request, state: &S) -> Result<Self, Self::Rejection> { |
