Files
GlobalProtect-openconnect/apps/gpservice/src/routes.rs
2024-01-16 22:18:20 +08:00

14 lines
359 B
Rust

use std::sync::Arc;
use axum::{routing::{get, post}, Router};
use crate::{handlers, ws_server::WsServerContext};
pub(crate) fn routes(ctx: Arc<WsServerContext>) -> Router {
Router::new()
.route("/health", get(handlers::health))
.route("/active-gui", post(handlers::active_gui))
.route("/ws", get(handlers::ws_handler))
.with_state(ctx)
}