Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix sync check - it was always reporting success even in failure cases
zadamb5480b413705
diff --git a/src/routes/api/sync.js b/src/routes/api/sync.jsindex b5d6590eae..b0d1da20f6 100644--- a/src/routes/api/sync.js+++ b/src/routes/api/sync.js@@ -13,13 +13,13 @@ const dateUtils = require('../../services/date_utils');const entityConstructor = require('../../entities/entity_constructor');const utils = require('../../services/utils');-function testSync() {+async function testSync() {try {if (!syncOptions.isSyncSetup()) {return { success: false, message: "Sync server host is not configured. Please configure sync first." };}- syncService.login();+ await syncService.login();// login was successful so we'll kick off sync now// this is important in case when sync server has been just initialized