From 3fb532ff6d96462db982541320846522a3f75323 Mon Sep 17 00:00:00 2001 From: Menci Date: Fri, 17 May 2019 14:43:10 +0800 Subject: [PATCH] Remove unnecessary code --- modules/submission.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/submission.js b/modules/submission.js index 15f061b..d029602 100644 --- a/modules/submission.js +++ b/modules/submission.js @@ -123,7 +123,6 @@ app.get('/submissions', async (req, res) => { await judge_state.forEachAsync(async obj => { await obj.loadRelationships(); - if (obj.problem.type !== 'submit-answer') obj.code_length = Buffer.from(obj.code).length; }); res.render('submissions', { @@ -174,8 +173,6 @@ app.get('/submission/:id', async (req, res) => { await judge.loadRelationships(); if (judge.problem.type !== 'submit-answer') { - judge.code_length = Buffer.from(judge.code).length; - let key = syzoj.utils.getFormattedCodeKey(judge.code, judge.language); if (key) { let formattedCode = await FormattedCode.findOne({