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

Method edit_comment

library/src/services/handlers.rs:69–84  ·  view source on GitHub ↗
(
        cmd: EditComment,
        context: AtomicContextManager,
    )

Source from the content-addressed store, hash-verified

67 }
68
69 pub fn edit_comment(
70 cmd: EditComment,
71 context: AtomicContextManager,
72 ) -> Future<ServiceResponse> {
73 Box::pin(async move {
74 let mut uow =
75 UnitOfWork::<Repository<BoardAggregate>>::new(context.clone())
76 .await?;
77
78 let mut board_aggregate = uow.repository().get(&cmd.board_id.to_string()).await?;
79 board_aggregate.edit_comment(cmd)?;
80 uow.repository().update(&mut board_aggregate).await?;
81 uow.commit().await?;
82 Ok(().into())
83 })
84 }
85
86 pub fn handle_outbox(outbox: Outbox, context: AtomicContextManager) -> Future<ServiceResponse> {
87 Box::pin(async move {

Callers

nothing calls this directly

Calls 4

repositoryMethod · 0.80
getMethod · 0.45
updateMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected