14 lines
205 B
Rust
14 lines
205 B
Rust
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 }
|
|
}
|
|
}
|