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

Method hasLabel

src/service/moment.service.js:77–81  ·  view source on GitHub ↗
(momentId, labelId)

Source from the content-addressed store, hash-verified

75 }
76
77 async hasLabel(momentId, labelId) {
78 const statement = `SELECT * FROM moment_label WHERE moment_id = ? AND label_id = ?`;
79 const [result] = await connection.execute(statement, [momentId, labelId]);
80 return result[0] ? true: false;
81 }
82
83 async addLabel(momentId, labelId) {
84 const statement = `INSERT INTO moment_label (moment_id, label_id) VALUES (?, ?);`;

Callers 1

addLabelsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected