From c8288f279cd472af6b81dd0335767dba6c547c08 Mon Sep 17 00:00:00 2001 From: Daniil Isakov <12859907+oplexz@users.noreply.github.com> Date: Thu, 11 Jan 2024 19:33:05 +0300 Subject: [PATCH] Fix errors according to ESLint --- src/lib/Server.js | 10 ++++++---- src/lib/Util.js | 2 +- src/package-lock.json | 2 +- src/package.json | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/lib/Server.js b/src/lib/Server.js index 19b4d6fc..b2b60738 100644 --- a/src/lib/Server.js +++ b/src/lib/Server.js @@ -10,6 +10,8 @@ const session = require('koa-session'); const bodyParser = require('koa-bodyparser'); const serve = require('koa-static'); +const debug = require('debug')('Server'); + const ServerError = require('./ServerError'); const WireGuard = require('../services/WireGuard'); @@ -60,7 +62,7 @@ module.exports = class Server { ctx.session.authenticated = true; - console.log(`New Session: ${ctx.session.id}`); + debug(`New Session: ${ctx.session.id}`); }) // WireGuard @@ -94,7 +96,7 @@ module.exports = class Server { ctx.session = null; - console.log(`Deleted Session: ${sessionId}`); + debug(`Deleted Session: ${sessionId}`); }) .get('/api/wireguard/client', async (ctx) => { ctx.body = await WireGuard.getClients(); @@ -162,8 +164,8 @@ module.exports = class Server { }); this.app.listen(PORT, WEBUI_HOST, () => { - console.log(`Listening on http://${WEBUI_HOST}:${PORT}`); + debug(`Listening on http://${WEBUI_HOST}:${PORT}`); }); } -}; \ No newline at end of file +}; diff --git a/src/lib/Util.js b/src/lib/Util.js index 474c9cbb..a39d7769 100644 --- a/src/lib/Util.js +++ b/src/lib/Util.js @@ -42,4 +42,4 @@ module.exports = class Util { }); } -}; \ No newline at end of file +}; diff --git a/src/package-lock.json b/src/package-lock.json index e04522cf..72fd42ab 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -5188,4 +5188,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/package.json b/src/package.json index a4baeee4..bd9c00cd 100644 --- a/src/package.json +++ b/src/package.json @@ -35,4 +35,4 @@ "engines": { "node": "18" } -} \ No newline at end of file +}