(
State(bus): State<Arc<MessageBus>>,
Json(cmd): Json<AddComment>,
)
| 33 | |
| 34 | #[utoipa::path(post, path = "/boards/comments",request_body=AddComment)] |
| 35 | pub async fn add_comment( |
| 36 | State(bus): State<Arc<MessageBus>>, |
| 37 | Json(cmd): Json<AddComment>, |
| 38 | ) -> Result<WebResponse<ServiceResponse>, Exception> { |
| 39 | let res = bus.handle(cmd).await.map_err(Exception)?; |
| 40 | |
| 41 | Ok(WebResponse(res)) |
| 42 | } |
| 43 | |
| 44 | #[utoipa::path(patch, path = "/boards/comments",request_body=EditComment)] |
| 45 | pub async fn edit_comment( |