we now remember past source ids so app restart won't change anything in sync operation

This commit is contained in:
azivner
2017-11-16 21:50:00 -05:00
parent 9e7fcdfe15
commit b2d1ca1c28
15 changed files with 144 additions and 104 deletions

View File

@@ -14,9 +14,8 @@ router.post('/now', auth.checkApiAuth, async (req, res, next) => {
router.get('/changed', auth.checkApiAuth, async (req, res, next) => {
const lastSyncId = parseInt(req.query.lastSyncId);
const sourceId = req.query.sourceId;
res.send(await sql.getResults("SELECT * FROM sync WHERE id > ? AND source_id != ?", [lastSyncId, sourceId]));
res.send(await sql.getResults("SELECT * FROM sync WHERE id > ?", [lastSyncId]));
});
router.get('/notes/:noteId', auth.checkApiAuth, async (req, res, next) => {