- return VideoAbuse.findAndCountAll(query).asCallback(function (err, result) {
- if (err) return callback(err)
-
- return callback(null, result.rows, result.count)
+ return VideoAbuse.findAndCountAll(query).then(({ rows, count }) => {
+ return { total: count, data: rows }