From fad5988ed6243aac9052ef6f501e540b3de68877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 12 May 2021 10:38:11 -0400 Subject: [PATCH] fix: tests --- src/controllers/accounts/posts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/accounts/posts.js b/src/controllers/accounts/posts.js index a2996084dd..7b7575c119 100644 --- a/src/controllers/accounts/posts.js +++ b/src/controllers/accounts/posts.js @@ -157,7 +157,7 @@ async function getPostsFromUserSet(template, req, res, callback) { const stop = start + itemsPerPage - 1; const sets = await data.getSets(req.uid, userData); let result; - if (plugins.hasListeners('filter:account.getPostsFromUserSet')) { + if (plugins.hooks.hasListeners('filter:account.getPostsFromUserSet')) { result = await plugins.hooks.fire('filter:account.getPostsFromUserSet', { req: req, template: template, @@ -170,7 +170,7 @@ async function getPostsFromUserSet(template, req, res, callback) { itemData: [], }); } else { - result = utils.promiseParallel({ + result = await utils.promiseParallel({ itemCount: settings.usePagination ? db.sortedSetsCardSum(sets) : 0, itemData: getItemData(sets, data, req, start, stop), });