|
|
|
@ -592,7 +592,7 @@ app.post('/problem/:id/submit', app.multer.fields([{ name: 'answer', maxCount: 1
|
|
|
|
|
const curUser = res.locals.user; |
|
|
|
|
|
|
|
|
|
if (!problem) throw new ErrorMessage('无此题目。'); |
|
|
|
|
if (problem.type !== 'submit-answer' && !syzoj.languages[req.body.language]) throw new ErrorMessage('不支持该语言。'); |
|
|
|
|
if (problem.type !== 'submit-answer' && !syzoj.config.enabled_languages.includes(req.body.language)) throw new ErrorMessage('不支持该语言。'); |
|
|
|
|
if (!curUser) throw new ErrorMessage('请登录后继续。', { '登录': syzoj.utils.makeUrl(['login'], { 'url': syzoj.utils.makeUrl(['problem', id]) }) }); |
|
|
|
|
|
|
|
|
|
let judge_state; |
|
|
|
|