Browse Source

Show id descending by default.

pull/6/head
t123yh 7 years ago
parent
commit
4cc605f228
  1. 2
      modules/user.js

2
modules/user.js

@ -25,7 +25,7 @@ let User = syzoj.model('user');
app.get('/ranklist', async (req, res) => {
try {
const sort = req.query.sort || "id";
const order = req.query.order || "asc";
const order = req.query.order || "desc";
console.log("SORT ===> " + sort + ", ORDER ===> " + order);
if (!['ac_num', 'rating', 'id', 'username'].includes(sort) || !['asc', 'desc'].includes(order)) {
throw new ErrorMessage('错误的排序参数。');

Loading…
Cancel
Save