mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-17 15:50:10 +02:00
feat: store topic tags in topic hash (#9656)
* feat: store topic tags in topic hash breaking: remove color info from tags (use css) * fix: remove unused tag modal * fix: tag search
This commit is contained in:
committed by
GitHub
parent
0d3f74b762
commit
4a56388ec3
@@ -89,8 +89,11 @@ Topics.addTags = async (req, res) => {
|
||||
if (!await privileges.topics.canEdit(req.params.tid, req.user.uid)) {
|
||||
return helpers.formatApiResponse(403, res);
|
||||
}
|
||||
const cid = await topics.getTopicField(req.params.tid, 'cid');
|
||||
await topics.validateTags(req.body.tags, cid, req.user.uid, req.params.tid);
|
||||
const tags = await topics.filterTags(req.body.tags);
|
||||
|
||||
await topics.createTags(req.body.tags, req.params.tid, Date.now());
|
||||
await topics.addTags(tags, [req.params.tid]);
|
||||
helpers.formatApiResponse(200, res);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user