mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
feat: add image and imageClass to post summaries
This commit is contained in:
@@ -76,7 +76,7 @@ module.exports = function (Posts) {
|
|||||||
async function getTopicAndCategories(tids) {
|
async function getTopicAndCategories(tids) {
|
||||||
const topicsData = await topics.getTopicsFields(tids, ['uid', 'tid', 'title', 'cid', 'slug', 'deleted', 'postcount', 'mainPid']);
|
const topicsData = await topics.getTopicsFields(tids, ['uid', 'tid', 'title', 'cid', 'slug', 'deleted', 'postcount', 'mainPid']);
|
||||||
const cids = _.uniq(topicsData.map(topic => topic && topic.cid));
|
const cids = _.uniq(topicsData.map(topic => topic && topic.cid));
|
||||||
const categoriesData = await categories.getCategoriesFields(cids, ['cid', 'name', 'icon', 'slug', 'parentCid', 'bgColor', 'color']);
|
const categoriesData = await categories.getCategoriesFields(cids, ['cid', 'name', 'icon', 'slug', 'parentCid', 'bgColor', 'color', 'image', 'imageClass']);
|
||||||
return { topics: topicsData, categories: categoriesData };
|
return { topics: topicsData, categories: categoriesData };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user