generated from alecodes/base-template
feat: add sqlx transaction extractor to router
This commit is contained in:
parent
cfaf7ecc1f
commit
a662b94b21
8 changed files with 79 additions and 14 deletions
|
|
@ -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)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue