Browse Source

Remove route for the removed submit page

master
Menci 8 years ago
parent
commit
b1c4845ecb
  1. 20
      modules/problem.js

20
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);

Loading…
Cancel
Save