From b1c4845ecb9870650c390c43876c99ccaaa1a9a4 Mon Sep 17 00:00:00 2001 From: Menci Date: Tue, 17 Jan 2017 08:32:48 +0800 Subject: [PATCH] Remove route for the removed submit page --- modules/problem.js | 20 -------------------- 1 file changed, 20 deletions(-) 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);