server: api/mod.rs — route scope /api with health + session endpoints
This commit is contained in:
parent
ff476f12dc
commit
843c7bbbf2
17
server/src/api/mod.rs
Normal file
17
server/src/api/mod.rs
Normal file
@ -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),
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user