Bläddra i källkod

日志查询bug

hl 10 månader sedan
förälder
incheckning
46f7290067
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      src/web.js

+ 2 - 2
src/web.js

@@ -76,7 +76,7 @@ function init() {
     app.get('/isOK', (req, res) => {
         res.send({'code': 200, 'data': true, "message": "SUCCESS"});
     });
-    app.get('/logs', async (req, res) => {
+    app.get('/logs', (req, res) => {
         // 获取发送过来的信息(请求体的数据)
         const param = req.query;
         const n = param.n
@@ -95,7 +95,7 @@ function init() {
             var logPath = "./logs" + port
             // 将相对路径转换为绝对路径
             const directoryPath = path.resolve(logPath);
-            await file.checkPathSync(directoryPath)
+            file.checkPathSync(directoryPath)
 
             logger.info(`日志相对地址:${logPath}`)
             file.getLastFile(logPath, 10, (fileNameList) => {