浏览代码

测试代码

MaiXinRong 3 年之前
父节点
当前提交
0648e30de5
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      app/controller/dashboard_controller.js
  2. 1 1
      app/router.js

+ 1 - 1
app/controller/dashboard_controller.js

@@ -225,7 +225,7 @@ module.exports = app => {
         }
 
         async logTest(ctx) {
-            ctx.body = JSON.stringify(this.ctx.logger, '', '\t');
+            ctx.body = JSON.stringify(ctx.logger, '', '\t');
         }
     }
 

+ 1 - 1
app/router.js

@@ -52,7 +52,7 @@ module.exports = app => {
     app.get('/dashboard/msg/add/:id', sessionAuth, 'dashboardController.msgAdd');
     app.post('/dashboard/msg/set/:id', sessionAuth, datetimeFill, 'dashboardController.msgSet');
     app.get('/dashboard/msg/del/:id', sessionAuth, 'dashboardController.msgDelete');
-    app.get('/log-test', 'dashboardController.logTest');
+    app.get('/logTest', 'dashboardController.logTest');
 
     // 推送相关
     // app.post('/dashboard/push', sessionAuth, 'dashboardController.pushSet');