mirror of
https://github.com/tokio-rs/axum.git
synced 2025-04-26 13:56:22 +02:00
Don't use impl IntoResponse
in readme
This commit is contained in:
parent
19596584da
commit
6e6aa8f39e
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue