mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-31 19:15:58 +01:00
feat: allow tag editing from topic tools
closes #7536 closes #7465 closes #11538
This commit is contained in:
@@ -100,13 +100,21 @@ Topics.unfollow = async (req, res) => {
|
||||
helpers.formatApiResponse(200, res);
|
||||
};
|
||||
|
||||
Topics.updateTags = async (req, res) => {
|
||||
const payload = await api.topics.updateTags(req, {
|
||||
tid: req.params.tid,
|
||||
tags: req.body.tags,
|
||||
});
|
||||
helpers.formatApiResponse(200, res, payload);
|
||||
};
|
||||
|
||||
Topics.addTags = async (req, res) => {
|
||||
await api.topics.addTags(req, {
|
||||
const payload = await api.topics.addTags(req, {
|
||||
tid: req.params.tid,
|
||||
tags: req.body.tags,
|
||||
});
|
||||
|
||||
helpers.formatApiResponse(200, res);
|
||||
helpers.formatApiResponse(200, res, payload);
|
||||
};
|
||||
|
||||
Topics.deleteTags = async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user