mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-04 21:15:55 +01:00
Topic await errors (#7727)
* feat: derp await * feat: restore user.getSettings * feat: cleanup * feat: make tid const * feat: cleanup * fix: tests * feat: deprecate filter:controllers.topic.get * feat: rewrite post-index logic * feat: change calculation to match others * fix: use .async * feat: remove try/catch wrapper
This commit is contained in:
committed by
GitHub
parent
5e46cf9b09
commit
bd640a1107
@@ -89,9 +89,7 @@ module.exports = function (Categories) {
|
||||
var stop = data.stop === -1 ? data.stop : start + normalTidsToGet - 1;
|
||||
|
||||
if (Array.isArray(set)) {
|
||||
var weights = set.map(function (s, index) {
|
||||
return index ? 0 : 1;
|
||||
});
|
||||
const weights = set.map((s, index) => (index ? 0 : 1));
|
||||
db[direction === 'highest-to-lowest' ? 'getSortedSetRevIntersect' : 'getSortedSetIntersect']({ sets: set, start: start, stop: stop, weights: weights }, next);
|
||||
} else {
|
||||
db[direction === 'highest-to-lowest' ? 'getSortedSetRevRange' : 'getSortedSetRange'](set, start, stop, next);
|
||||
|
||||
Reference in New Issue
Block a user