MCPcopy Create free account
hub / github.com/coderwhy/coderhub / create

Method create

src/service/comment.service.js:5–10  ·  view source on GitHub ↗
(momentId, content, userId)

Source from the content-addressed store, hash-verified

3
4class CommentService {
5 async create(momentId, content, userId) {
6 const statement = `INSERT INTO comment (content, moment_id, user_id) VALUES (?, ?, ?);`;
7 `INSERT INTO comment SET ?`
8 const [result] = await connection.execute(statement, [content, momentId, userId]);
9 return result;
10 }
11
12 async reply(momentId, content, userId, commentId) {
13 const statement = `INSERT INTO comment (content, moment_id, user_id, comment_id) VALUES (?, ?, ?, ?);`;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected