Skip to content

Commit

Permalink
Merged in orderBy (pull request coding-blocks#46)
Browse files Browse the repository at this point in the history
Added orderby in contest and it is present in problems.

Approved-by: Varun Hasija <[email protected]>
  • Loading branch information
sd5869 authored and Varun Hasija committed Feb 20, 2018
2 parents 3a27989 + 1709ddf commit cac153b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions services/contest.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const getAllContests = function (params, user_id) {
};
return Promise.all([Contest.findAll({
where,
order: '"createdAt" DESC',
limit: params.page.size,
offset: (params.page.number - 1) * params.page.size
}),
Expand Down

0 comments on commit cac153b

Please sign in to comment.