summaryrefslogtreecommitdiff
path: root/server/src/server.rs
blob: 647abf98d28836bde1be0460d2441d6819bacc1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use sqlx::PgPool;
use std::sync::Arc;

use axum::Extension;

use crate::auth::Authenticator;

pub struct ServerContext {
    pub app_url: String,
    pub authenticator: Box<dyn Authenticator + Send + Sync>,
    pub db: PgPool,
}
pub type ContextExtension = Extension<Arc<ServerContext>>;