mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-05-02 18:29:28 -05:00
removed username/password from setup
This commit is contained in:
@@ -12,9 +12,7 @@ function initDocumentOptions() {
|
||||
optionService.createOption('documentSecret', utils.randomSecureToken(16), false);
|
||||
}
|
||||
|
||||
function initSyncedOptions(username, password) {
|
||||
optionService.createOption('username', username, true);
|
||||
|
||||
function initPassword(username, password) {
|
||||
optionService.createOption('passwordVerificationSalt', utils.randomSecureToken(32), true);
|
||||
optionService.createOption('passwordDerivedKeySalt', utils.randomSecureToken(32), true);
|
||||
|
||||
@@ -129,7 +127,7 @@ function getKeyboardDefaultOptions() {
|
||||
|
||||
module.exports = {
|
||||
initDocumentOptions,
|
||||
initSyncedOptions,
|
||||
initPassword,
|
||||
initNotSyncedOptions,
|
||||
initStartupOptions
|
||||
};
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user