backend/src/api/mod.rs
Radical a602c2624f
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
style: cargo fmt & clippy fixes
2025-07-20 16:30:46 +02:00

16 lines
365 B
Rust

//! `/api` Contains the entire API
use std::sync::Arc;
use axum::{Router, routing::get};
use crate::AppState;
mod v1;
mod versions;
pub fn router(path: &str, app_state: Arc<AppState>) -> Router<Arc<AppState>> {
Router::new()
.route(&format!("{path}/versions"), get(versions::versions))
.nest(&format!("{path}/v1"), v1::router(app_state))
}