From e843593b17162eb03027d41e3ff56e779e92ded3 Mon Sep 17 00:00:00 2001 From: Emile Nijssen Date: Fri, 12 Nov 2021 21:27:58 +0000 Subject: [PATCH] eslint --- package-lock.json | 4 ++++ package.json | 2 +- src/lib/Util.js | 2 +- src/lib/WireGuard.js | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..0fa0c25 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,4 @@ +{ + "version": "1.0.0", + "lockfileVersion": 1 +} diff --git a/package.json b/package.json index 20f2858..e3e3284 100644 --- a/package.json +++ b/package.json @@ -5,4 +5,4 @@ "serve": "docker-compose -f docker-compose.yml -f docker-compose.dev.yml up", "start": "docker run --env WG_HOST=0.0.0.0 --name wg-easy --cap-add=NET_ADMIN --cap-add=SYS_MODULE --sysctl=\"net.ipv4.conf.all.src_valid_mark=1\" --mount type=bind,source=\"$(pwd)\"/config,target=/etc/wireguard -p 51820:51820/udp -p 51821:51821/tcp wg-easy" } -} \ No newline at end of file +} diff --git a/src/lib/Util.js b/src/lib/Util.js index bb6f8fe..2a47a20 100644 --- a/src/lib/Util.js +++ b/src/lib/Util.js @@ -19,7 +19,7 @@ module.exports = class Util { static promisify(fn) { // eslint-disable-next-line func-names - return function (req, res) { + return function(req, res) { Promise.resolve().then(async () => fn(req, res)) .then(result => { if (res.headersSent) return; diff --git a/src/lib/WireGuard.js b/src/lib/WireGuard.js index d37455d..271a247 100644 --- a/src/lib/WireGuard.js +++ b/src/lib/WireGuard.js @@ -38,7 +38,7 @@ module.exports = class WireGuard { } catch (err) { const privateKey = await Util.exec('wg genkey'); const publicKey = await Util.exec(`echo ${privateKey} | wg pubkey`, { - log: `echo ***hidden*** | wg pubkey` + log: 'echo ***hidden*** | wg pubkey', }); const address = WG_DEFAULT_ADDRESS.replace('x', '1');