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

@@ -6,6 +6,7 @@ const sql = require('../../services/sql');
const auth = require('../../services/auth');
const data_encryption = require('../../services/data_encryption');
const protected_session = require('../../services/protected_session');
const sync_table = require('../../services/sync_table');
router.get('/:noteId', auth.checkApiAuth, async (req, res, next) => {
const noteId = req.params.noteId;
@@ -27,7 +28,7 @@ router.put('', auth.checkApiAuth, async (req, res, next) => {
await sql.doInTransaction(async () => {
await sql.replace("notes_history", req.body);
await sql.addNoteHistorySync(req.body.note_history_id);
await sync_table.addNoteHistorySync(req.body.note_history_id);
});
res.send();