Reorganize
This commit is contained in:
24
crates/service/service-webpage/src/routes/mod.rs
Normal file
24
crates/service/service-webpage/src/routes/mod.rs
Normal file
@@ -0,0 +1,24 @@
|
||||
use axum::Router;
|
||||
use axum::routing::get;
|
||||
use tracing::info;
|
||||
use utoipa::OpenApi;
|
||||
|
||||
mod assets;
|
||||
mod betalupi;
|
||||
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))
|
||||
.nest(asset_prefix, asset_router)
|
||||
}
|
||||
Reference in New Issue
Block a user