feat: provide connection pool to routes
This commit is contained in:
parent
f4deaceb27
commit
68e825c942
5 changed files with 43 additions and 20 deletions
|
|
@ -7,9 +7,8 @@ use tokio::net::TcpListener;
|
|||
/// API routing
|
||||
pub fn app(connection: PgPool) -> Router {
|
||||
Router::new()
|
||||
.with_state(connection)
|
||||
.merge(crate::routes::routes_health_check())
|
||||
.merge(crate::routes::routes_subscriptions())
|
||||
.merge(crate::routes::routes_subscriptions(connection))
|
||||
}
|
||||
|
||||
/// Start the server
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue