Rocket should manage DbConn, not Option<DbConn>
Otherwise it fails when using DbConn as a request guard
This commit is contained in:
parent
4f84b2a3ed
commit
3b7842d040
@ -56,7 +56,7 @@ fn init_pool() -> Option<DbPool> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let pool = init_pool();
|
let pool = init_pool().expect("Couldn't intialize database pool");
|
||||||
rocket::ignite()
|
rocket::ignite()
|
||||||
.mount("/", routes![
|
.mount("/", routes![
|
||||||
routes::blogs::paginated_details,
|
routes::blogs::paginated_details,
|
||||||
|
Loading…
Reference in New Issue
Block a user