sync cleanup

This commit is contained in:
azivner
2017-11-01 00:47:39 -04:00
parent 0e8fcbc0f5
commit 72905a9854
2 changed files with 18 additions and 31 deletions

View File

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