Browse Source

Fix errors according to ESLint

pull/750/head
Daniil Isakov 3 years ago
parent
commit
c8288f279c
  1. 10
      src/lib/Server.js
  2. 2
      src/lib/Util.js
  3. 2
      src/package-lock.json
  4. 2
      src/package.json

10
src/lib/Server.js

@ -10,6 +10,8 @@ const session = require('koa-session');
const bodyParser = require('koa-bodyparser'); const bodyParser = require('koa-bodyparser');
const serve = require('koa-static'); const serve = require('koa-static');
const debug = require('debug')('Server');
const ServerError = require('./ServerError'); const ServerError = require('./ServerError');
const WireGuard = require('../services/WireGuard'); const WireGuard = require('../services/WireGuard');
@ -60,7 +62,7 @@ module.exports = class Server {
ctx.session.authenticated = true; ctx.session.authenticated = true;
console.log(`New Session: ${ctx.session.id}`); debug(`New Session: ${ctx.session.id}`);
}) })
// WireGuard // WireGuard
@ -94,7 +96,7 @@ module.exports = class Server {
ctx.session = null; ctx.session = null;
console.log(`Deleted Session: ${sessionId}`); debug(`Deleted Session: ${sessionId}`);
}) })
.get('/api/wireguard/client', async (ctx) => { .get('/api/wireguard/client', async (ctx) => {
ctx.body = await WireGuard.getClients(); ctx.body = await WireGuard.getClients();
@ -162,8 +164,8 @@ module.exports = class Server {
}); });
this.app.listen(PORT, WEBUI_HOST, () => { this.app.listen(PORT, WEBUI_HOST, () => {
console.log(`Listening on http://${WEBUI_HOST}:${PORT}`); debug(`Listening on http://${WEBUI_HOST}:${PORT}`);
}); });
} }
}; };

2
src/lib/Util.js

@ -42,4 +42,4 @@ module.exports = class Util {
}); });
} }
}; };

2
src/package-lock.json

@ -5188,4 +5188,4 @@
} }
} }
} }
} }

2
src/package.json

@ -35,4 +35,4 @@
"engines": { "engines": {
"node": "18" "node": "18"
} }
} }

Loading…
Cancel
Save