feat: add sqlx transaction extractor to router

This commit is contained in:
Alexander Navarro 2025-02-22 18:54:44 -03:00
parent cfaf7ecc1f
commit a662b94b21
8 changed files with 79 additions and 14 deletions

View file

@ -77,9 +77,8 @@ async fn main() -> Result<()> {
let app = router::new()
.layer(TraceLayer::new_for_http().on_request(()))
.with_state(AppState::new(tmpl_env))
.layer(tx_layer)
.with_state(tx_state);
.with_state(AppState::new(tmpl_env, tx_state));
// Add hot reload only on dev mode
#[cfg(debug_assertions)]