Skip to content

Commit

Permalink
Feat: use app state correctly on routes
Browse files Browse the repository at this point in the history
  • Loading branch information
rhwddy committed May 2, 2024
1 parent 2b13578 commit 7665b6b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/config/router.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
use crate::{config::database, routes};
use crate::routes;
use axum::Router;

use super::app_state::app_state;

pub async fn initialize_routes() -> Router {
let app_state = database::connection().await;
let app_state = app_state().await;
Router::new()
.merge(routes::healthchecker::create_route())
.merge(routes::user::create_routes(app_state))
Expand Down

0 comments on commit 7665b6b

Please sign in to comment.