(Path(graceful): Path<bool>, stop_handle: web::Data<StopHandle>)
| 9 | |
| 10 | #[post("/stop/{graceful}")] |
| 11 | async fn stop(Path(graceful): Path<bool>, stop_handle: web::Data<StopHandle>) -> HttpResponse { |
| 12 | stop_handle.stop(graceful); |
| 13 | HttpResponse::NoContent().finish() |
| 14 | } |
| 15 | |
| 16 | #[actix_web::main] |
| 17 | async fn main() -> std::io::Result<()> { |