Node.js based forum software built for the modern web
refactor: shorter code for pinned topics
Barış Soner Uşaklıff952e596aba
diff --git a/src/categories/topics.js b/src/categories/topics.jsindex 7ee0ee838d..2abb272475 100644--- a/src/categories/topics.js+++ b/src/categories/topics.js@@ -24,12 +24,8 @@ module.exports = function (Categories) {};Categories.getTopicIds = async function (data) {- const dataForPinned = { ...data };- dataForPinned.start = 0;- dataForPinned.stop = -1;-const [pinnedTids, set, direction] = await Promise.all([- Categories.getPinnedTids(dataForPinned),+ Categories.getPinnedTids({ ...data, start: 0, stop: -1 }),Categories.buildTopicsSortedSet(data),Categories.getSortedSetRangeDirection(data.sort),]);