mod agent;
mod proxy;
use axum::Router;
use std::sync::Arc;
use crate::state::RelayState;
pub use agent::agent_ws_handler;
pub use proxy::proxy_handler;
pub fn routes() -> Router<Arc<RelayState>> {
Router::new()
.route("/health", axum::routing::get(health))
.route("/agent", axum::routing::get(agent::agent_ws_handler))
.fallback(proxy::proxy_handler)
}
async fn health() -> &'static str {
"OK"
}