|
|
@ -206,7 +206,7 @@ app.get('/contest/:id/:pid', async (req, res) => { |
|
|
|
try { |
|
|
|
try { |
|
|
|
let contest_id = parseInt(req.params.id); |
|
|
|
let contest_id = parseInt(req.params.id); |
|
|
|
let contest = await Contest.fromID(contest_id); |
|
|
|
let contest = await Contest.fromID(contest_id); |
|
|
|
if (!await contest.isRunning()) throw 'The contest has ended.' |
|
|
|
if (!await contest.isRunning()) throw 'The contest has ended or not started.' |
|
|
|
|
|
|
|
|
|
|
|
let problems_id = await contest.getProblems(); |
|
|
|
let problems_id = await contest.getProblems(); |
|
|
|
|
|
|
|
|
|
|
|