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

Commit

Permalink
Explicitly state ordering direction when getting votes for an issue.
Browse files Browse the repository at this point in the history
This implements the intended functionality/clarity from
56054c2 by using the proper
syntax, which is an array of tuples and not a simple array.
  • Loading branch information
sklirg committed Mar 1, 2018
1 parent 2567d9f commit c26da11
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 c26da11

Please sign in to comment.