Add option to check for updates when setting up server

This commit is contained in:
sigaloid 2022-07-19 16:55:57 -04:00
parent e42c527a19
commit 20975fc635
2 changed files with 7 additions and 0 deletions

View File

@ -5,6 +5,7 @@ const optionService = require('../services/options');
const myScryptService = require('../services/my_scrypt');
const log = require('../services/log');
const passwordService = require("../services/password");
const options = require('../services/options');
function loginPage(req, res) {
res.render('login', { failedAuth: false });
@ -36,6 +37,7 @@ function setPassword(req, res) {
return;
}
options.setOption("checkForUpdates", req.body['check-for-updates'] == true);
passwordService.setPassword(password1);
res.redirect('login');

View File

@ -33,6 +33,11 @@
<input id="password" name="password2" placeholder="" class="form-control" type="password">
</div>
</div>
<div class="form-group">
<input id="check-for-updates" type="checkbox" name="check-for-updates">
<label for="check-for-updates">Check for updates automatically</label>
</div>
<div class="form-group">
<button class="btn btn-success">Set password</button>
</div>