From 18d70c6060c63541bc1dbb2db1d367ad23340fb2 Mon Sep 17 00:00:00 2001 From: Nikola Petrov Date: Tue, 16 Jul 2024 14:08:19 +0200 Subject: [PATCH] Remove WakeOnLan --- routes/main.js | 16 ---------------- views/wake.hbs | 10 ---------- 2 files changed, 26 deletions(-) delete mode 100644 views/wake.hbs diff --git a/routes/main.js b/routes/main.js index 653b328..947a20d 100644 --- a/routes/main.js +++ b/routes/main.js @@ -118,22 +118,6 @@ router.get('/cash', function (req, res, next) { res.render('cash', { title: 'Cash' }); }); -router.get('/wake', function (req, res, next) { - res.render('wake', { title: 'Cash' }); -}); - -const checkAuthenticated = require('../middleware/checkAuthenticated.js'); -const wakeOnLan = require('@mi-sec/wol'); -router.post('/wake', checkAuthenticated, function (req, res) { - wakeOnLan(req.user.mac_address, { - address: '255.255.255.255', - packets: 1, - interval: 100, - port: 9 - }); - res.render('wake', { message: 'Waking up' }); -}); - const userRouter = require('./user'); //router.use('/user', userRouter); diff --git a/views/wake.hbs b/views/wake.hbs deleted file mode 100644 index d928d1c..0000000 --- a/views/wake.hbs +++ /dev/null @@ -1,10 +0,0 @@ -
-
-
- - -
- -
- {{message}} -
\ No newline at end of file