From 5acd674a09abc59f831b7809f750a74b78a3136e Mon Sep 17 00:00:00 2001 From: richie Date: Fri, 28 Jun 2019 11:55:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=95=B0=E4=B9=9F=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/user.js | 2 +- views/ranklist.ejs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/user.js b/modules/user.js index 24ac11c..ab559ab 100644 --- a/modules/user.js +++ b/modules/user.js @@ -9,7 +9,7 @@ app.get('/ranklist', async (req, res) => { try { const sort = req.query.sort || syzoj.config.sorting.ranklist.field; const order = req.query.order || syzoj.config.sorting.ranklist.order; - if (!['ac_num', 'rating', 'id', 'username'].includes(sort) || !['asc', 'desc'].includes(order)) { + if (!['ac_num', 'submit_num', 'rating', 'id', 'username'].includes(sort) || !['asc', 'desc'].includes(order)) { throw new ErrorMessage('错误的排序参数。'); } let paginate = syzoj.utils.paginate(await User.countForPagination({ is_show: true }), req.query.page, syzoj.config.page.ranklist); diff --git a/views/ranklist.ejs b/views/ranklist.ejs index b3e9cf4..7e94ce2 100644 --- a/views/ranklist.ejs +++ b/views/ranklist.ejs @@ -15,7 +15,7 @@ <%- createSortableTitle('username', '用户名', true) %> <%- createSortableTitle('ac_num', '通过数量', false) %> <%- createSortableTitle('submit_num', '提交数量', true) %> - <%- createSortableTitle('percent', '通过率', true) %> + 通过率 <%- createSortableTitle('rating', '积分', false) %>