Browse Source

Rewrite judge filter logic.

pull/6/head
t123yh 7 years ago
parent
commit
89b2443ae3
  1. 14
      modules/admin.js

14
modules/admin.js

@ -240,12 +240,14 @@ app.post('/admin/rejudge', async (req, res) => {
let maxScore = parseInt(req.body.max_score);
if (isNaN(maxScore)) maxScore = 100;
where.score = {
$and: {
$gte: parseInt(minScore),
$lte: parseInt(maxScore)
}
};
if (!(minScore === 0 && maxScore === 100)) {
where.score = {
$and: {
$gte: parseInt(minScore),
$lte: parseInt(maxScore)
}
};
}
let minTime = syzoj.utils.parseDate(req.body.min_time);
if (isNaN(minTime)) minTime = 0;

Loading…
Cancel
Save