use axum::{extract::Extension, Json};

use crate::{app_state::{AppState, ExperimentConfigSnapshot}, error::AppError};

pub async fn config(Extension(state): Extension<AppState>) -> Result<Json<ExperimentConfigSnapshot>, AppError> {
    Ok(Json(state.experiment_config().await))
}
