Some checks failed
Test / verify-generated-code (pull_request) Successful in 56s
Test / test-frontend (pull_request) Successful in 22s
Test / frontend-build (pull_request) Successful in 24s
Test / test (pull_request) Successful in 1m14s
Test / lint (pull_request) Failing after 1m13s
15 lines
431 B
Rust
15 lines
431 B
Rust
mod health;
|
|
|
|
use axum::{Router, response::IntoResponse, routing::any};
|
|
|
|
pub fn get_api_router() -> Router {
|
|
Router::new()
|
|
.nest("/health", health::get_health_router())
|
|
// explicit fallback for unmatched API routes
|
|
.route("/{*wildcard}", any(api_fallback_handler))
|
|
}
|
|
|
|
async fn api_fallback_handler() -> impl IntoResponse {
|
|
(axum::http::StatusCode::NOT_FOUND, "API route not found").into_response()
|
|
}
|