mirror of
https://github.com/actix/actix-website
synced 2024-11-27 18:12:57 +01:00
Fix param name in db example (#191)
This commit is contained in:
parent
e7ca7fddd7
commit
c5e185ae85
@ -46,7 +46,7 @@ async fn main() -> io::Result<()> {
|
|||||||
// </main>
|
// </main>
|
||||||
|
|
||||||
// <index>
|
// <index>
|
||||||
async fn index(req: web::Data<DbPool>, name: web::Path<(String)>) -> impl Responder {
|
async fn index(pool: web::Data<DbPool>, name: web::Path<(String)>) -> impl Responder {
|
||||||
let name = name.into_inner();
|
let name = name.into_inner();
|
||||||
|
|
||||||
let conn = pool.get().expect("couldn't get db connection from pool");
|
let conn = pool.get().expect("couldn't get db connection from pool");
|
||||||
|
Loading…
Reference in New Issue
Block a user