mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 06:45:49 +01:00
fixed waitForSync
This commit is contained in:
@@ -44,7 +44,7 @@ const auth = require('../services/auth');
|
||||
const cls = require('../services/cls');
|
||||
const sql = require('../services/sql');
|
||||
const protectedSessionService = require('../services/protected_session');
|
||||
const syncService = require('../services/sync');
|
||||
const syncTableService = require('../services/sync_table');
|
||||
const csurf = require('csurf');
|
||||
|
||||
const csrfMiddleware = csurf({
|
||||
@@ -53,7 +53,7 @@ const csrfMiddleware = csurf({
|
||||
});
|
||||
|
||||
function apiResultHandler(req, res, result) {
|
||||
res.setHeader('trilium-max-sync-id', syncService.getMaxSyncId());
|
||||
res.setHeader('trilium-max-sync-id', syncTableService.getMaxSyncId());
|
||||
|
||||
// if it's an array and first element is integer then we consider this to be [statusCode, response] format
|
||||
if (Array.isArray(result) && result.length > 0 && Number.isInteger(result[0])) {
|
||||
|
||||
Reference in New Issue
Block a user