diff --git a/modules/problem.js b/modules/problem.js index 1b6a159..4093f31 100644 --- a/modules/problem.js +++ b/modules/problem.js @@ -185,26 +185,6 @@ app.post('/problem/:id/upload', app.multer.single('testdata'), async (req, res) } }); -app.get('/submit/:id', async (req, res) => { - try { - let id = parseInt(req.params.id); - let problem = await Problem.fromID(id); - - if (!problem) throw 'No such problem.'; - if (!res.locals.user) throw 'Please login.'; - if (!await problem.isAllowedUseBy(res.locals.user)) throw 'Permission denied.'; - - res.render('submit', { - problem: problem - }); - } catch (e) { - syzoj.log(e); - res.render('error', { - err: e - }); - } -}); - app.post('/submit/:id', async (req, res) => { try { let id = parseInt(req.params.id);