syncification

This commit is contained in:
zadam
2020-06-20 12:31:38 +02:00
parent 30062d687f
commit 88348c560c
97 changed files with 1673 additions and 1700 deletions

View File

@@ -4,11 +4,11 @@ const sqlInit = require('../services/sql_init');
const setupService = require('../services/setup');
const utils = require('../services/utils');
async function setupPage(req, res) {
if (await sqlInit.isDbInitialized()) {
function setupPage(req, res) {
if (sqlInit.isDbInitialized()) {
if (utils.isElectron()) {
const windowService = require('../services/window');
await windowService.createMainWindow();
windowService.createMainWindow();
windowService.closeSetupWindow();
}
else {
@@ -18,7 +18,7 @@ async function setupPage(req, res) {
// we got here because DB is not completely initialized so if schema exists
// it means we're in sync in progress state.
const syncInProgress = await sqlInit.schemaExists();
const syncInProgress = sqlInit.schemaExists();
if (syncInProgress) {
// trigger sync if it's not already running