MCPcopy Index your code
hub / github.com/dev-mastery/comments-api / remove

Function remove

src/data-access/comments-db.js:72–76  ·  view source on GitHub ↗
({ id: _id })

Source from the content-addressed store, hash-verified

70 return result.modifiedCount > 0 ? { id: _id, ...commentInfo } : null
71 }
72 async function remove ({ id: _id }) {
73 const db = await makeDb()
74 const result = await db.collection('comments').deleteOne({ _id })
75 return result.deletedCount
76 }
77 async function findByHash (comment) {
78 const db = await makeDb()
79 const result = await db.collection('comments').find({ hash: comment.hash })

Callers

nothing calls this directly

Calls 1

makeDbFunction · 0.70

Tested by

no test coverage detected