removed username/password from setup

This commit is contained in:
zadam
2021-12-28 22:59:38 +01:00
parent a910034c96
commit 7e48d214ca
5 changed files with 52 additions and 129 deletions

View File

@@ -45,9 +45,7 @@ async function initDbConnection() {
dbReady.resolve();
}
async function createInitialDatabase(username, password, theme) {
log.info("Creating database schema ...");
async function createInitialDatabase() {
if (isDbInitialized()) {
throw new Error("DB is already initialized");
}
@@ -57,9 +55,9 @@ async function createInitialDatabase(username, password, theme) {
let rootNote;
log.info("Creating root note ...");
sql.transactional(() => {
log.info("Creating database schema ...");
sql.executeScript(schema);
require("../becca/becca_loader").load();
@@ -67,6 +65,8 @@ async function createInitialDatabase(username, password, theme) {
const Note = require("../becca/entities/note");
const Branch = require("../becca/entities/branch");
log.info("Creating root note ...");
rootNote = new Note({
noteId: 'root',
title: 'root',
@@ -87,8 +87,7 @@ async function createInitialDatabase(username, password, theme) {
const optionsInitService = require('./options_init');
optionsInitService.initDocumentOptions();
optionsInitService.initSyncedOptions(username, password);
optionsInitService.initNotSyncedOptions(true, { theme });
optionsInitService.initNotSyncedOptions(true, {});
optionsInitService.initStartupOptions();
});