ares-api 0.1.0

HTTP server for Ares AI scraper
1
2
3
4
5
6
7
8
9
10
11
12
use std::path::PathBuf;

use ares_db::Database;

/// Shared application state, available to all route handlers via `State<Arc<AppState>>`.
pub struct AppState {
    pub db: Database,
    /// Admin API key for protecting write endpoints (None = admin endpoints disabled).
    pub admin_token: Option<String>,
    /// Path to the schemas directory for schema resolution.
    pub schemas_dir: PathBuf,
}