//! The platform's HTTP surface: lobby, stats, auth and health routes. //! //! Handlers live in submodules mirroring the Python implementation; this //! module assembles them into one axum [`Router`]. pub mod auth; pub mod games; pub mod health; pub mod me; pub mod openapi; pub mod stats; use axum::routing::get; use axum::Router; use crate::platform::SharedPlatform; use crate::ws; /// All platform routes (HTTP + the live-play websocket). /// /// `providers` lists the configured OIDC provider names; login/callback/ /// logout routes are registered per provider so unknown provider paths fall /// through to the router's fallback. pub fn router(providers: &[String]) -> Router { Router::new() .merge(health::routes()) .merge(me::routes()) .merge(auth::routes(providers)) .merge(games::routes()) .merge(stats::routes()) .merge(openapi::routes()) .route("/ws/games/{game_id}", get(ws::game_socket)) }