mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-16 00:00:18 +02:00
Don't use impl IntoResponse in readme
This commit is contained in:
+1
-1
@@ -66,7 +66,7 @@ async fn create_user(
|
||||
// this argument tells axum to parse the request body
|
||||
// as JSON into a `CreateUser` type
|
||||
Json(payload): Json<CreateUser>,
|
||||
) -> impl IntoResponse {
|
||||
) -> (StatusCode, Json<User>) {
|
||||
// insert your application logic here
|
||||
let user = User {
|
||||
id: 1337,
|
||||
|
||||
Reference in New Issue
Block a user