mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
add tagwhitelist to topic api
This commit is contained in:
@@ -175,7 +175,8 @@ Topics.getTopicWithPosts = function (topicData, set, uid, start, stop, reverse,
|
|||||||
function (next) {
|
function (next) {
|
||||||
async.parallel({
|
async.parallel({
|
||||||
posts: async.apply(getMainPostAndReplies, topicData, set, uid, start, stop, reverse),
|
posts: async.apply(getMainPostAndReplies, topicData, set, uid, start, stop, reverse),
|
||||||
category: async.apply(Topics.getCategoryData, topicData.tid),
|
category: async.apply(categories.getCategoryData, topicData.cid),
|
||||||
|
tagWhitelist: async.apply(categories.getTagWhitelist, [topicData.cid]),
|
||||||
threadTools: async.apply(plugins.fireHook, 'filter:topic.thread_tools', { topic: topicData, uid: uid, tools: [] }),
|
threadTools: async.apply(plugins.fireHook, 'filter:topic.thread_tools', { topic: topicData, uid: uid, tools: [] }),
|
||||||
isFollowing: async.apply(Topics.isFollowing, [topicData.tid], uid),
|
isFollowing: async.apply(Topics.isFollowing, [topicData.tid], uid),
|
||||||
isIgnoring: async.apply(Topics.isIgnoring, [topicData.tid], uid),
|
isIgnoring: async.apply(Topics.isIgnoring, [topicData.tid], uid),
|
||||||
@@ -198,6 +199,7 @@ Topics.getTopicWithPosts = function (topicData, set, uid, start, stop, reverse,
|
|||||||
function (results, next) {
|
function (results, next) {
|
||||||
topicData.posts = results.posts;
|
topicData.posts = results.posts;
|
||||||
topicData.category = results.category;
|
topicData.category = results.category;
|
||||||
|
topicData.tagWhitelist = results.tagWhitelist[0];
|
||||||
topicData.thread_tools = results.threadTools.tools;
|
topicData.thread_tools = results.threadTools.tools;
|
||||||
topicData.isFollowing = results.isFollowing[0];
|
topicData.isFollowing = results.isFollowing[0];
|
||||||
topicData.isNotFollowing = !results.isFollowing[0] && !results.isIgnoring[0];
|
topicData.isNotFollowing = !results.isFollowing[0] && !results.isIgnoring[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user