MCPcopy
hub / github.com/dev-mastery/comments-api / deleteCommentAndParent

Function deleteCommentAndParent

src/use-cases/remove-comment.js:74–84  ·  view source on GitHub ↗
(comment)

Source from the content-addressed store, hash-verified

72 }
73
74 async function deleteCommentAndParent (comment) {
75 await Promise.all([
76 commentsDb.remove(comment),
77 commentsDb.remove({ id: comment.replyToId })
78 ])
79 return {
80 deletedCount: 2,
81 softDelete: false,
82 message: 'Comment and parent deleted.'
83 }
84 }
85
86 async function hardDelete (comment) {
87 await commentsDb.remove(comment)

Callers 1

makeRemoveCommentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected