From e3c41f2e281c1cac9d753771e4b6cbb072fa1750 Mon Sep 17 00:00:00 2001 From: "Philip H." <47042125+pheiduck@users.noreply.github.com> Date: Sat, 6 Jan 2024 21:54:47 +0000 Subject: [PATCH] fixup: lint errors --- src/lib/Server.js | 2 +- src/lib/WireGuard.js | 4 ++-- src/www/js/app.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/Server.js b/src/lib/Server.js index 1de7e6d5..6ae56769 100644 --- a/src/lib/Server.js +++ b/src/lib/Server.js @@ -128,7 +128,7 @@ module.exports = class Server { res.header('Content-Type', 'text/plain'); res.send(config); })) - .post('/api/wireguard/client', Util.promisify(async req => { + .post('/api/wireguard/client', Util.promisify(async (req) => { const { name, allowedIps } = req.body; return WireGuard.createClient({ name, allowedIps }); })) diff --git a/src/lib/WireGuard.js b/src/lib/WireGuard.js index f05a7835..fd379465 100644 --- a/src/lib/WireGuard.js +++ b/src/lib/WireGuard.js @@ -232,11 +232,11 @@ Endpoint = ${WG_HOST}:${WG_PORT}`; let address; if (allowedIps) { - address = allowedIps + address = allowedIps; } else { // Calculate next IP for (let i = 2; i < 255; i++) { - const client = Object.values(config.clients).find(client => { + const client = Object.values(config.clients).find((client) => { return client.address.includes(WG_DEFAULT_ADDRESS.replace('x', i)); }); diff --git a/src/www/js/app.js b/src/www/js/app.js index 0d303fdf..e9448c37 100644 --- a/src/www/js/app.js +++ b/src/www/js/app.js @@ -222,7 +222,7 @@ new Vue({ if (!name) return; this.api.createClient({ name, allowedIps }) - .catch(err => alert(err.message || err.toString())) + .catch((err) => alert(err.message || err.toString())) .finally(() => this.refresh().catch(console.error)); }, deleteClient(client) {