small improvements to sync table handling

This commit is contained in:
zadam
2020-07-31 00:08:01 +02:00
parent 3582013a33
commit 17d7ff3ff1
4 changed files with 10 additions and 10 deletions

View File

@@ -49,7 +49,7 @@ async function loginSync(req) {
return {
sourceId: sourceIdService.getCurrentSourceId(),
maxSyncId: await sql.getValue("SELECT MAX(id) FROM sync WHERE isSynced = 1")
maxSyncId: await sql.getValue("SELECT COALESCE(MAX(id), 0) FROM sync WHERE isSynced = 1")
};
}