diff --git a/modules/submission.js b/modules/submission.js index 340908e..30f7b7f 100644 --- a/modules/submission.js +++ b/modules/submission.js @@ -47,7 +47,7 @@ app.get('/submissions', async (req, res) => { if (user) where.user_id = user.id; else if (req.query.submitter) where.user_id = -1; - if (req.query.contest == null) { + if (!req.query.contest) { where.type = { $ne: 1 }; } else { const contestId = Number(req.query.contest); diff --git a/views/submissions.ejs b/views/submissions.ejs index 21055d1..dd7b9a4 100644 --- a/views/submissions.ejs +++ b/views/submissions.ejs @@ -15,6 +15,7 @@ <% } %>