Added Postgres backend and SQLx.
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
pub mod dtos;
|
||||
mod transactions;
|
||||
|
||||
pub fn create_router() -> axum::Router {
|
||||
axum::Router::new().nest(
|
||||
"/api",
|
||||
axum::Router::new().nest("/transactions", transactions::create_router()),
|
||||
)
|
||||
pub fn create_router(pool: sqlx::PgPool) -> axum::Router {
|
||||
axum::Router::new()
|
||||
.nest(
|
||||
"/api",
|
||||
axum::Router::new().nest("/transactions", transactions::create_router()),
|
||||
)
|
||||
.with_state(pool)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user