mirror of https://github.com/TriliumNext/Notes
#98, sync is now configured in the options
parent
073300bbcd
commit
e7460ca3a9
@ -0,0 +1,8 @@
|
||||
INSERT INTO options (name, value, dateCreated, dateModified, isSynced)
|
||||
VALUES ('syncServerHost', '', '2018-06-01T03:35:55.041Z', '2018-06-01T03:35:55.041Z', 0);
|
||||
|
||||
INSERT INTO options (name, value, dateCreated, dateModified, isSynced)
|
||||
VALUES ('syncServerTimeout', '5000', '2018-06-01T03:35:55.041Z', '2018-06-01T03:35:55.041Z', 0);
|
||||
|
||||
INSERT INTO options (name, value, dateCreated, dateModified, isSynced)
|
||||
VALUES ('syncProxy', '', '2018-06-01T03:35:55.041Z', '2018-06-01T03:35:55.041Z', 0);
|
||||
@ -1,11 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
const config = require('./config');
|
||||
const optionService = require('./options');
|
||||
|
||||
module.exports = {
|
||||
SYNC_SERVER: config['Sync']['syncServerHost'],
|
||||
isSyncSetup: !!config['Sync']['syncServerHost'],
|
||||
SYNC_TIMEOUT: config['Sync']['syncServerTimeout'] || 5000,
|
||||
SYNC_PROXY: config['Sync']['syncProxy'],
|
||||
SYNC_CERT_PATH: config['Sync']['syncServerCertificate']
|
||||
getSyncServer: async () => await optionService.getOption('syncServerHost'),
|
||||
isSyncSetup: async () => !!await optionService.getOption('syncServerHost'),
|
||||
getSyncTimeout: async () => await optionService.getOption('syncServerTimeout'),
|
||||
getSyncProxy: async () => await optionService.getOption('syncProxy')
|
||||
};
|
||||
Loading…
Reference in New Issue