Skip to content

Node.js based forum software built for the modern web

feat: add image and imageClass to post summaries

Barış Soner Uşaklı80bd52fcfae3
diff --git a/src/posts/summary.js b/src/posts/summary.js
index fd29f9e667..c86d10cdfa 100644
--- a/src/posts/summary.js
+++ b/src/posts/summary.js
@@ -76,7 +76,7 @@ module.exports = function (Posts) {
async function getTopicAndCategories(tids) {
const topicsData = await topics.getTopicsFields(tids, ['uid', 'tid', 'title', 'cid', 'slug', 'deleted', 'postcount', 'mainPid']);
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 };
}