瀏覽代碼

机器人id判断

JiahengHe 2 月之前
父節點
當前提交
cb100105ab
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/web.js

+ 3 - 0
src/web.js

@@ -155,6 +155,9 @@ function init() {
                 port = value.port
             }
         })
+        if (port === -1){
+            return res.status(404).send('机器人不存在!');
+        }
         const logPath = "./db" + port;
         const directoryPath = path.resolve(logPath);
         // logger.info('文件目录:' + directoryPath)