api/ws/modules/assignments/mod.rs
1//! WebSocket topic routes for assignment-related communication.
2//!
3//! Includes real-time submission progress updates and per-ticket chat channels.
4//!
5//! Effective paths (this module is nested under `/ws/modules/{module_id}/assignments`):
6//! - `/ws/modules/{module_id}/assignments/{assignment_id}/submissions/{submission_id}/progress`
7//!
8//! Both endpoints are WebSocket upgrade routes.
9
10use axum::{routing::get, Router};
11use util::{state::AppState, ws::default_websocket_handler};
12
13pub mod submissions;
14
15/// Builds the `/ws/modules/{module_id}/assignments` WebSocket router.
16pub fn ws_assignment_routes() -> Router<AppState> {
17 Router::new()
18 .route("/{assignment_id}/submissions/{submission_id}/progress",get(default_websocket_handler))
19}