1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
//! `GET /cfg` request
use std::sync::Arc;
use axum::{Extension, Json};
use adapter::client::Locked;
use primitives::Config;
use crate::Application;
/// GET `/cfg` request
///
/// Response: [`Config`]
pub async fn get_cfg<C: Locked + 'static>(
Extension(app): Extension<Arc<Application<C>>>,
) -> Json<Config> {
Json(app.config.clone())
}