(momentId, content, userId)
| 3 | |
| 4 | class 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 (?, ?, ?, ?);`; |
nothing calls this directly
no outgoing calls
no test coverage detected