From 2dee15a357dd4cd237501bc45d63ffd1e036e578 Mon Sep 17 00:00:00 2001 From: hewenyang Date: Sun, 15 Apr 2018 03:54:49 +0000 Subject: [PATCH] Allow sort by publicize time --- modules/problem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/problem.js b/modules/problem.js index dcc990d..4d2dc3c 100644 --- a/modules/problem.js +++ b/modules/problem.js @@ -35,7 +35,7 @@ app.get('/problems', async (req, res) => { try { const sort = req.query.sort || syzoj.config.sorting.problem.field; const order = req.query.order || syzoj.config.sorting.problem.order; - if (!['id', 'title', 'rating', 'ac_num', 'submit_num', 'ac_rate'].includes(sort) || !['asc', 'desc'].includes(order)) { + if (!['id', 'title', 'rating', 'ac_num', 'submit_num', 'ac_rate', 'publicize_time'].includes(sort) || !['asc', 'desc'].includes(order)) { throw new ErrorMessage('错误的排序参数。'); }