27 lines
614 B
Rust
27 lines
614 B
Rust
use axum::Router;
|
|
use axum::routing::get;
|
|
use tracing::info;
|
|
use utoipa::OpenApi;
|
|
|
|
pub mod assets;
|
|
mod betalupi;
|
|
mod handouts;
|
|
mod index;
|
|
mod links;
|
|
|
|
#[derive(OpenApi)]
|
|
#[openapi(tags(), paths(), components(schemas()))]
|
|
pub(super) struct Api;
|
|
|
|
pub(super) fn router() -> Router<()> {
|
|
let (asset_prefix, asset_router) = assets::asset_router();
|
|
info!("Serving assets at {asset_prefix}");
|
|
|
|
Router::new()
|
|
.route("/", get(index::index))
|
|
.route("/whats-a-betalupi", get(betalupi::betalupi))
|
|
.route("/links", get(links::links))
|
|
.route("/handouts", get(handouts::handouts))
|
|
.nest(asset_prefix, asset_router)
|
|
}
|