From 843c7bbbf286b02b4a88a9c0e3c036ce9378cce1 Mon Sep 17 00:00:00 2001 From: Butterfly Dev Date: Tue, 7 Apr 2026 03:08:57 +0000 Subject: [PATCH] =?UTF-8?q?server:=20api/mod.rs=20=E2=80=94=20route=20scop?= =?UTF-8?q?e=20/api=20with=20health=20+=20session=20endpoints?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/api/mod.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 server/src/api/mod.rs diff --git a/server/src/api/mod.rs b/server/src/api/mod.rs new file mode 100644 index 0000000..cd21a5a --- /dev/null +++ b/server/src/api/mod.rs @@ -0,0 +1,17 @@ +pub mod health; +pub mod sessions; + +use actix_web::web; + +/// Configure all REST API routes under /api. +pub fn configure(cfg: &mut web::ServiceConfig) { + cfg.service( + web::scope("/api") + .service(health::health) + .service(sessions::list_sessions) + .service(sessions::create_session) + .service(sessions::get_session) + .service(sessions::delete_session) + .service(sessions::send_hud_command), + ); +}