diff --git a/modules/problem.js b/modules/problem.js index 05e0b38..fea51a9 100644 --- a/modules/problem.js +++ b/modules/problem.js @@ -465,7 +465,7 @@ app.post('/problem/:id/import', async (req, res) => { problem.file_io = json.obj.file_io; problem.file_io_input_name = json.obj.file_io_input_name; problem.file_io_output_name = json.obj.file_io_output_name; - if(json.obj.type) problem.type = json.obj.type; + if (json.obj.type) problem.type = json.obj.type; let validateMsg = await problem.validate(); if (validateMsg) throw new ErrorMessage('无效的题目数据配置。', null, validateMsg);