diff --git a/src/home/controller/index.js b/src/home/controller/index.js index 803ec9f..0cedcb3 100644 --- a/src/home/controller/index.js +++ b/src/home/controller/index.js @@ -302,15 +302,16 @@ export default class extends Base { let params = this.param(); let file = params.file; console.log('file:--------------->', file); - if (!file || file.includes('test-') == -1) { - return this.fail('文件名错误'); - } + // if (!file || file.includes('test-') == -1) { + // return this.fail('文件名错误'); + // } try { let txt = fs.readFileSync(path.join(LECHALLENGE_PATH, params.file)) this.json(txt); } catch (e) { console.log('文件名错误', e); - return this.fail('文件名错误'); + this.status(404); + return this.json(""); } } } \ No newline at end of file