- return AccountBlocklistModel
- .scope([ ScopeNames.WITH_ACCOUNTS ])
- .findAndCountAll<MAccountBlocklistAccounts>(query)
- .then(({ rows, count }) => {
- return { total: count, data: rows }
- })
+ return Promise.all([
+ AccountBlocklistModel.count(getQuery(true)),
+ AccountBlocklistModel.findAll(getQuery(false))
+ ]).then(([ total, data ]) => ({ total, data }))