torrust_index_backend/web/api/v1/contexts/about/
handlers.rs1use std::sync::Arc;
4
5use axum::extract::State;
6use axum::http::{header, StatusCode};
7use axum::response::{IntoResponse, Response};
8
9use crate::common::AppData;
10use crate::services::about;
11
12#[allow(clippy::unused_async)]
13pub async fn about_page_handler(State(_app_data): State<Arc<AppData>>) -> Response {
14 (
15 StatusCode::OK,
16 [(header::CONTENT_TYPE, "text/html; charset=utf-8")],
17 about::page(),
18 )
19 .into_response()
20}
21
22#[allow(clippy::unused_async)]
23pub async fn license_page_handler(State(_app_data): State<Arc<AppData>>) -> Response {
24 (
25 StatusCode::OK,
26 [(header::CONTENT_TYPE, "text/html; charset=utf-8")],
27 about::license_page(),
28 )
29 .into_response()
30}