Merge remote-tracking branch 'origin/stable'

# Conflicts:
#	libraries/ckeditor/ckeditor.js.map
#	package.json
#	src/routes/api/login.js
#	src/routes/api/sync.js
#	src/routes/index.js
#	src/services/app_info.js
#	src/services/sync.js
This commit is contained in:
zadam
2020-08-02 20:41:22 +02:00
12 changed files with 25 additions and 17 deletions

View File

@@ -50,7 +50,7 @@ function getStats() {
function checkSync() {
return {
entityHashes: contentHashService.getEntityHashes(),
maxSyncId: sql.getValue('SELECT MAX(id) FROM sync WHERE isSynced = 1')
maxSyncId: sql.getValue('SELECT COALESCE(MAX(id), 0) FROM sync WHERE isSynced = 1')
};
}
@@ -124,7 +124,7 @@ function getChanged(req) {
const ret = {
syncs: syncService.getSyncRecords(syncs),
maxSyncId: sql.getValue('SELECT MAX(id) FROM sync WHERE isSynced = 1')
maxSyncId: sql.getValue('SELECT COALESCE(MAX(id), 0) FROM sync WHERE isSynced = 1')
};
if (ret.syncs.length > 0) {