mirror of
https://github.com/zadam/trilium.git
synced 2025-11-04 20:36:13 +01:00
sync check failure is now shown as error message in frontend
This commit is contained in:
@@ -4,7 +4,6 @@ const log = require('./log');
|
||||
const rp = require('request-promise');
|
||||
const sql = require('./sql');
|
||||
const options = require('./options');
|
||||
const migration = require('./migration');
|
||||
const utils = require('./utils');
|
||||
const config = require('./config');
|
||||
const source_id = require('./source_id');
|
||||
@@ -14,6 +13,7 @@ const content_hash = require('./content_hash');
|
||||
const event_log = require('./event_log');
|
||||
const fs = require('fs');
|
||||
const app_info = require('./app_info');
|
||||
const messaging = require('./messaging');
|
||||
|
||||
const SYNC_SERVER = config['Sync']['syncServerHost'];
|
||||
const isSyncSetup = !!SYNC_SERVER;
|
||||
@@ -271,6 +271,8 @@ async function checkContentHash(syncContext) {
|
||||
log.info("Content hash check PASSED with value: " + localContentHash);
|
||||
}
|
||||
else {
|
||||
await messaging.sendMessage({type: 'sync-hash-check-failed'});
|
||||
|
||||
await event_log.addEvent("Content hash check FAILED. Local is " + localContentHash + ", remote is " + resp.content_hash);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user