|
|
@ -691,20 +691,6 @@ app.post('/problem/:id/submit', app.multer.fields([{ name: 'answer', maxCount: 1 |
|
|
|
key: key |
|
|
|
key: key |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (!formattedCode) { |
|
|
|
|
|
|
|
let formatted = await CodeFormatter(judge_state.code, syzoj.languages[req.body.language].format); |
|
|
|
|
|
|
|
if (formatted) { |
|
|
|
|
|
|
|
formattedCode = await FormattedCode.create({ |
|
|
|
|
|
|
|
key: key, |
|
|
|
|
|
|
|
code: formatted |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
await formattedCode.save(); |
|
|
|
|
|
|
|
} catch (e) {} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|