feat: add image and imageClass to post summaries

v1.18.x
Barış Soner Uşaklı 5 years ago
parent 5362488584
commit 80bd52fcfa

@ -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 };
}

Loading…
Cancel
Save