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

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