Added AppState.

This commit is contained in:
2026-10-12 13:05:38 +02:00
parent 0b0c72b337
commit e963947bf8
12 changed files with 31 additions and 15 deletions
+13
View File
@@ -0,0 +1,13 @@
use axum::extract::FromRef;
use sqlx::PgPool;
#[derive(Clone, FromRef)]
pub struct AppState {
pub pool: PgPool,
}
impl AppState {
pub fn new(pool: PgPool) -> Self {
Self { pool }
}
}