Merge pull request #474 from lbryio/421-channel-sorting

reversed order of channel claims
This commit is contained in:
Bill Bittner 2018-06-11 16:02:25 -07:00 committed by GitHub
commit 9b9e3d05e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -227,7 +227,7 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {
this this
.findAll({ .findAll({
where: { certificateId: channelClaimId }, where: { certificateId: channelClaimId },
order: [['height', 'ASC']], order: [['height', 'DESC']],
raw : true, // returns an array of only data, not an array of instances raw : true, // returns an array of only data, not an array of instances
}) })
.then(channelClaimsArray => { .then(channelClaimsArray => {