mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
Merge branch 'stable'
This commit is contained in:
@@ -7,6 +7,7 @@ const options = require('../../services/options');
|
||||
const audit_category = require('../../services/audit_category');
|
||||
const auth = require('../../services/auth');
|
||||
const utils = require('../../services/utils');
|
||||
const build = require('../../services/build');
|
||||
|
||||
// options allowed to be updated directly in settings dialog
|
||||
const ALLOWED_OPTIONS = ['encryption_session_timeout', 'history_snapshot_time_interval'];
|
||||
@@ -14,6 +15,8 @@ const ALLOWED_OPTIONS = ['encryption_session_timeout', 'history_snapshot_time_in
|
||||
router.get('/all', auth.checkApiAuth, async (req, res, next) => {
|
||||
const settings = await sql.getMap("SELECT opt_name, opt_value FROM options");
|
||||
|
||||
Object.assign(settings, build);
|
||||
|
||||
res.send(settings);
|
||||
});
|
||||
|
||||
@@ -21,6 +24,8 @@ router.get('/', auth.checkApiAuth, async (req, res, next) => {
|
||||
const settings = await sql.getMap("SELECT opt_name, opt_value FROM options WHERE opt_name IN ("
|
||||
+ ALLOWED_OPTIONS.map(x => '?').join(",") + ")", ALLOWED_OPTIONS);
|
||||
|
||||
Object.assign(settings, build);
|
||||
|
||||
res.send(settings);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user