this repo has no description
1use sqlx::PgPool;
2use crate::repo::PostgresBlockStore;
3
4#[derive(Clone)]
5pub struct AppState {
6 pub db: PgPool,
7 pub block_store: PostgresBlockStore,
8}
9
10impl AppState {
11 pub fn new(db: PgPool) -> Self {
12 let block_store = PostgresBlockStore::new(db.clone());
13 Self { db, block_store }
14 }
15}