diff --git a/example-app/src/api.rs b/example-app/src/api.rs index 85c0d60..28c9f5f 100644 --- a/example-app/src/api.rs +++ b/example-app/src/api.rs @@ -40,7 +40,7 @@ struct Status { status: String, } -async fn status_handler() -> Json { +async fn status_handler() -> impl IntoResponse { Json(Status { status: "OK".to_string(), }) @@ -57,7 +57,7 @@ struct CreateFeed { async fn post_handler( state: State, Json(payload): Json, -) -> (StatusCode, Json) { +) -> impl IntoResponse { let id = *(state.feed_id.read().unwrap()); let feed = Feed { id,