torrust_index_backend/web/api/v1/contexts/settings/
routes.rs

1//! API routes for the [`settings`](crate::web::api::v1::contexts::settings) API context.
2//!
3//! Refer to the [API endpoint documentation](crate::web::api::v1::contexts::settings).
4use std::sync::Arc;
5
6use axum::routing::get;
7use axum::Router;
8
9use super::handlers::{get_all_handler, get_public_handler, get_site_name_handler};
10use crate::common::AppData;
11
12/// Routes for the [`category`](crate::web::api::v1::contexts::category) API context.
13pub fn router(app_data: Arc<AppData>) -> Router {
14    Router::new()
15        .route("/", get(get_all_handler).with_state(app_data.clone()))
16        .route("/name", get(get_site_name_handler).with_state(app_data.clone()))
17        .route("/public", get(get_public_handler).with_state(app_data))
18}