Przeglądaj źródła

日志查询bug尝试修复

hl 1 rok temu
rodzic
commit
0c79a61bd8
1 zmienionych plików z 4 dodań i 3 usunięć
  1. 4 3
      src/web.js

+ 4 - 3
src/web.js

@@ -25,11 +25,12 @@ function init() {
     });
     app.get('/app', (req, res) => {
         // res.send('is OK!');
-        var str = new Map()
+        var s = JSON.parse("{}");
         robot.appMap.forEach((value, key) => {
-            str.set(key,JSON.stringify(value))
+            // str.set(key,JSON.stringify(value))
+            s.push(key,value)
         })
-        res.send(str);
+        res.send(JSON.stringify(s));
     });