1
0
Fork 0
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:
David Pedersen 2023-02-07 17:57:28 +01:00
parent 19596584da
commit 6e6aa8f39e

View file

@ -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,