MCPcopy Create free account
hub / github.com/Migorithm/rustiful-backend / add_comment

Function add_comment

bin/src/routes.rs:35–42  ·  view source on GitHub ↗
(
    State(bus): State<Arc<MessageBus>>,
    Json(cmd): Json<AddComment>,
)

Source from the content-addressed store, hash-verified

33
34#[utoipa::path(post, path = "/boards/comments",request_body=AddComment)]
35pub 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)]
45pub async fn edit_comment(

Callers 1

test_add_commentFunction · 0.85

Calls 2

WebResponseClass · 0.85
handleMethod · 0.80

Tested by 1

test_add_commentFunction · 0.68