From 85dbe35229156a25b8cf3ec3c98f59f6e6f00534 Mon Sep 17 00:00:00 2001 From: Menci Date: Tue, 13 Jun 2017 11:08:32 +0800 Subject: [PATCH] Change contests page order to desc --- modules/contest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/contest.js b/modules/contest.js index 0e31d3d..2284da0 100644 --- a/modules/contest.js +++ b/modules/contest.js @@ -29,7 +29,7 @@ let User = syzoj.model('user'); app.get('/contests', async (req, res) => { try { let paginate = syzoj.utils.paginate(await Contest.count(), req.query.page, syzoj.config.page.contest); - let contests = await Contest.query(paginate); + let contests = await Contest.query(paginate, null, [['start_time', 'desc']]); await contests.forEachAsync(async x => x.information = await syzoj.utils.markdown(x.information));