Browse Source

Fix default max score

pull/6/head
Menci 8 years ago
parent
commit
5916db2983
  1. 2
      modules/contest.js
  2. 2
      modules/submission.js

2
modules/contest.js

@ -224,7 +224,7 @@ app.get('/contest/:id/submissions', async (req, res) => {
let minScore = parseInt(req.query.min_score);
if (isNaN(minScore)) minScore = 0;
let maxScore = parseInt(req.query.max_score);
if (isNaN(maxScore)) maxScore = 0;
if (isNaN(maxScore)) maxScore = 100;
where.score = {
$and: {

2
modules/submission.js

@ -34,7 +34,7 @@ app.get('/submissions', async (req, res) => {
let minScore = parseInt(req.query.min_score);
if (isNaN(minScore)) minScore = 0;
let maxScore = parseInt(req.query.max_score);
if (isNaN(maxScore)) maxScore = 0;
if (isNaN(maxScore)) maxScore = 100;
where.score = {
$and: {

Loading…
Cancel
Save