fix: tests

v1.18.x
Barış Soner Uşaklı 4 years ago
parent 074ee859c4
commit fad5988ed6

@ -157,7 +157,7 @@ async function getPostsFromUserSet(template, req, res, callback) {
const stop = start + itemsPerPage - 1; const stop = start + itemsPerPage - 1;
const sets = await data.getSets(req.uid, userData); const sets = await data.getSets(req.uid, userData);
let result; let result;
if (plugins.hasListeners('filter:account.getPostsFromUserSet')) { if (plugins.hooks.hasListeners('filter:account.getPostsFromUserSet')) {
result = await plugins.hooks.fire('filter:account.getPostsFromUserSet', { result = await plugins.hooks.fire('filter:account.getPostsFromUserSet', {
req: req, req: req,
template: template, template: template,
@ -170,7 +170,7 @@ async function getPostsFromUserSet(template, req, res, callback) {
itemData: [], itemData: [],
}); });
} else { } else {
result = utils.promiseParallel({ result = await utils.promiseParallel({
itemCount: settings.usePagination ? db.sortedSetsCardSum(sets) : 0, itemCount: settings.usePagination ? db.sortedSetsCardSum(sets) : 0,
itemData: getItemData(sets, data, req, start, stop), itemData: getItemData(sets, data, req, start, stop),
}); });

Loading…
Cancel
Save