🎈 perf: 优化冗余代码

This commit is contained in:
zhiyu1998 2023-04-01 14:50:07 +08:00
parent b0b207b47b
commit c18bd3fa0e

View File

@ -176,7 +176,7 @@ export class query extends plugin {
}, },
) )
.then(resp => { .then(resp => {
// console.log(resp.data); // logger.info(resp.data);
return resp.data.result.uri.replace("index.html", "m.html"); return resp.data.result.uri.replace("index.html", "m.html");
}) })
.then(async uri => { .then(async uri => {
@ -254,7 +254,7 @@ export class query extends plugin {
e.reply(segment.image(fs.readFileSync(filePath))); e.reply(segment.image(fs.readFileSync(filePath)));
fs.unlinkSync(filePath, err => { fs.unlinkSync(filePath, err => {
if (err) throw err; if (err) throw err;
console.error("删除青年大学习文件失败"); logger.error("删除青年大学习文件失败");
}); });
}); });
}); });