From 422ca1140ca303646a9536e451e49fef078133b6 Mon Sep 17 00:00:00 2001 From: Menci Date: Tue, 13 Dec 2016 21:13:27 +0800 Subject: [PATCH] Fix contests not shown --- modules/contest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/contest.js b/modules/contest.js index 9f72213..d09b40b 100644 --- a/modules/contest.js +++ b/modules/contest.js @@ -28,7 +28,7 @@ let User = syzoj.model('user'); app.get('/contest', async (req, res) => { try { - let paginate = syzoj.utils.paginate(Contest.count(), req.query.page, syzoj.config.page.contest); + let paginate = syzoj.utils.paginate(await Contest.count(), req.query.page, syzoj.config.page.contest); let contests = await Contest.query(paginate); await contests.forEachAsync(async x => x.information = await syzoj.utils.markdown(x.information));