feat: provide connection pool to routes

This commit is contained in:
Sandro Eiler 2024-01-28 22:22:29 +01:00
parent f4deaceb27
commit 68e825c942
5 changed files with 43 additions and 20 deletions

View file

@ -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