Browse Source

Fix #88

pull/6/head
Menci 6 years ago
parent
commit
3c1e01a065
  1. 4
      modules/contest.js

4
modules/contest.js

@ -423,8 +423,10 @@ app.get('/contest/submission/:id', async (req, res) => {
info: getSubmissionInfo(judge, displayConfig), info: getSubmissionInfo(judge, displayConfig),
roughResult: getRoughResult(judge, displayConfig), roughResult: getRoughResult(judge, displayConfig),
code: (displayConfig.showCode && judge.problem.type !== 'submit-answer') ? judge.code.toString("utf8") : '', code: (displayConfig.showCode && judge.problem.type !== 'submit-answer') ? judge.code.toString("utf8") : '',
formattedCode: judge.formattedCode ? judge.formattedCode.toString("utf8") : null,
preferFormattedCode: res.locals.user ? res.locals.user.prefer_formatted_code : false,
detailResult: processOverallResult(judge.result, displayConfig), detailResult: processOverallResult(judge.result, displayConfig),
socketToken: (displayConfig.showDetailResult && judge.pending && x.task_id != null) ? jwt.sign({ socketToken: (displayConfig.showDetailResult && judge.pending && judge.task_id != null) ? jwt.sign({
taskId: judge.task_id, taskId: judge.task_id,
displayConfig: displayConfig, displayConfig: displayConfig,
type: 'detail' type: 'detail'

Loading…
Cancel
Save