mirror of https://github.com/rwf2/Rocket.git
Don't create two DB pools in todo example.
This commit is contained in:
parent
a6c4d053ad
commit
6f4c8b1377
|
@ -82,7 +82,7 @@ fn rocket() -> (Rocket, Option<db::Conn>) {
|
|||
};
|
||||
|
||||
let rocket = rocket::ignite()
|
||||
.manage(db::init_pool())
|
||||
.manage(pool)
|
||||
.mount("/", routes![index, static_files::all])
|
||||
.mount("/todo/", routes![new, toggle, delete])
|
||||
.attach(Template::fairing());
|
||||
|
|
Loading…
Reference in New Issue