Remove WakeOnLan

This commit is contained in:
Nikola Petrov 2024-07-16 14:08:19 +02:00
parent 2f68098f62
commit 18d70c6060
2 changed files with 0 additions and 26 deletions

View File

@ -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);

View File

@ -1,10 +0,0 @@
<div class="container">
<form action="/wake" method="post">
<div class="mb-3">
<label class="form-label">Password</label>
<input type="password" class="form-control" name="pass">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
{{message}}
</div>