mirror of
https://github.com/actix/examples
synced 2025-06-28 09:50:36 +02:00
rename web::State to web::Data
This commit is contained in:
@ -10,7 +10,7 @@ use uuid;
|
||||
/// Async request handler. Ddb pool is stored in application state.
|
||||
fn index(
|
||||
path: web::Path<String>,
|
||||
db: web::State<Pool<SqliteConnectionManager>>,
|
||||
db: web::Data<Pool<SqliteConnectionManager>>,
|
||||
) -> impl Future<Item = HttpResponse, Error = Error> {
|
||||
// execute sync code in threadpool
|
||||
web::block(move || {
|
||||
|
Reference in New Issue
Block a user