diff --git a/modules/contest.js b/modules/contest.js index 91536bc..f1b4a54 100644 --- a/modules/contest.js +++ b/modules/contest.js @@ -324,12 +324,14 @@ app.get('/contest/:id/submissions', async (req, res) => { if (!isNaN(minScore) || !isNaN(maxScore)) { if (isNaN(minScore)) minScore = 0; 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) + } + }; + } } } diff --git a/modules/submission.js b/modules/submission.js index 08a8bf2..340908e 100644 --- a/modules/submission.js +++ b/modules/submission.js @@ -69,12 +69,14 @@ app.get('/submissions', async (req, res) => { if (!isNaN(minScore) || !isNaN(maxScore)) { if (isNaN(minScore)) minScore = 0; 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) + } + }; + } } if (req.query.language) {