(
State(bus): State<Arc<MessageBus>>,
Json(cmd): Json<EditBoard>,
)
| 23 | #[utoipa::path(patch, path = "/boards",request_body=EditBoard)] |
| 24 | #[axum_macros::debug_handler] |
| 25 | pub async fn edit_board( |
| 26 | State(bus): State<Arc<MessageBus>>, |
| 27 | Json(cmd): Json<EditBoard>, |
| 28 | ) -> Result<WebResponse<ServiceResponse>, Exception> { |
| 29 | let res = bus.handle(cmd).await.map_err(Exception)?; |
| 30 | |
| 31 | Ok(WebResponse(res)) |
| 32 | } |
| 33 | |
| 34 | #[utoipa::path(post, path = "/boards/comments",request_body=AddComment)] |
| 35 | pub async fn add_comment( |