Browse Source

Remove verbose logs.

pull/6/head
t123yh 7 years ago
parent
commit
4163b13b04
  1. 1
      models/rating_calculation.js
  2. 1
      modules/user.js
  3. 1
      views/util.ejs

1
models/rating_calculation.js

@ -57,7 +57,6 @@ class RatingCalculation extends Model {
for (const history of histories) {
await history.loadRelationships();
const user = history.user;
console.log("Destroying history for user " + user.id);
await history.destroy();
const ratingItem = (await RatingHistory.findOne({
where: { user_id: user.id },

1
modules/user.js

@ -26,7 +26,6 @@ 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;
console.log("SORT ===> " + sort + ", ORDER ===> " + order);
if (!['ac_num', 'rating', 'id', 'username'].includes(sort) || !['asc', 'desc'].includes(order)) {
throw new ErrorMessage('错误的排序参数。');
}

1
views/util.ejs

@ -9,7 +9,6 @@ const getOrderString = function(order) {
}
this.createSortableTitle = function(item, display, defaultOrder) {
const isCurrent = curSort === item;
console.log(isCurrent ? (!curOrder) : defaultOrder)
const url = syzoj.utils.makeUrl(req,
Object.assign({}, req.query, {
sort: item,

Loading…
Cancel
Save