Function delete_user

Source
pub async fn delete_user(
    __arg0: State<AppState>,
    __arg1: Path<i32>,
) -> impl IntoResponse
Expand description

DELETE /api/test/users/{user_id}

Deletes a user by their numeric ID.
Intended for test environment teardown in non-production environments.

§Path parameters

  • user_id — The primary key of the user to delete.

§Example request

curl -X DELETE http://localhost:3000/api/test/users/1

§200 OK

{ "success": true, "data": null, "message": "User deleted" }

§404 Not Found

{ "success": false, "data": null, "message": "User not found" }