Kaynağa Gözat

修改错别字

dygapp 4 yıl önce
ebeveyn
işleme
ceee92d71b
1 değiştirilmiş dosya ile 6 ekleme ve 6 silme
  1. 6 6
      app/controller/systemctl.js

+ 6 - 6
app/controller/systemctl.js

@@ -79,10 +79,10 @@ class SystemctlController extends Controller {
       if (res.errcode === 0 && res.data !== '') {
         this.ctx.body = { errcode: 0, errmsg: '' };
       } else {
-        this.ctx.body = { errcode: -1, errmsg: '地址接失败' };
+        this.ctx.body = { errcode: -1, errmsg: '地址接失败' };
       }
     } catch (error) {
-      const body = { errcode: -1002, errmsg: '地址接异常', error };
+      const body = { errcode: -1002, errmsg: '地址接异常', error };
       throw new Error(JSON.stringify(body));
     }
   }
@@ -116,17 +116,17 @@ class SystemctlController extends Controller {
       throw new Error(JSON.stringify(body));
     }
   }
-  // 获取vpn接状态
+  // 获取vpn接状态
   async vpnstate() {
     try {
       const res = await this.service.shell.shell('swanctl -l | grep established');
       if (res.errcode === 0 && res.data.length > 0) {
-        this.ctx.body = { errcode: 0, errmsg: '', data: '已接' };
+        this.ctx.body = { errcode: 0, errmsg: '', data: '已接' };
       } else {
-        this.ctx.body = { errcode: 0, errmsg: '', data: '未接' };
+        this.ctx.body = { errcode: 0, errmsg: '', data: '未接' };
       }
     } catch (error) {
-      const body = { errcode: -1002, errmsg: '获取VPN接状态失败', error };
+      const body = { errcode: -1002, errmsg: '获取VPN接状态失败', error };
       throw new Error(JSON.stringify(body));
     }
   }