torrust-index-backend 2.0.0-alpha.3

The backend (API) for the Torrust Index project.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! API routes for the [`proxy`](crate::web::api::v1::contexts::proxy) API context.
//!
//! Refer to the [API endpoint documentation](crate::web::api::v1::contexts::proxy).
use std::sync::Arc;

use axum::routing::get;
use axum::Router;

use super::handlers::get_proxy_image_handler;
use crate::common::AppData;

/// Routes for the [`about`](crate::web::api::v1::contexts::about) API context.
pub fn router(app_data: Arc<AppData>) -> Router {
    Router::new().route("/image/:url", get(get_proxy_image_handler).with_state(app_data))
}