Skip to content
This repository has been archived by the owner on Oct 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #323 from dotkom/fix/getVotes-order-by-ascending
Browse files Browse the repository at this point in the history
Explicitly state ordering direction when getting votes for an issue.
  • Loading branch information
sklirg authored Mar 2, 2018
2 parents 6fbe878 + c26da11 commit 28ec7d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/models/vote.accessors.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ function getVotes(question) {
const issueId = question.id || question;
return Vote.findAll({
where: { issueId },
order: ['createdAt'],
order: [
['createdAt', 'ASC'],
],
}).map(plainObject);
}

Expand Down

0 comments on commit 28ec7d7

Please sign in to comment.