refactored "sync" table to "entity_changes" - more changes

This commit is contained in:
zadam
2020-08-02 23:43:39 +02:00
parent 864271d5ef
commit 7900622f38
13 changed files with 93 additions and 92 deletions

View File

@@ -66,7 +66,7 @@ function moveBranchBeforeNote(req) {
sql.execute("UPDATE branches SET notePosition = notePosition + 10 WHERE parentNoteId = ? AND notePosition >= ? AND isDeleted = 0",
[beforeNote.parentNoteId, beforeNote.notePosition]);
entityChangesService.addNoteReorderingSync(beforeNote.parentNoteId);
entityChangesService.addNoteReorderingEntityChange(beforeNote.parentNoteId);
if (branchToMove.parentNoteId === beforeNote.parentNoteId) {
branchToMove.notePosition = beforeNote.notePosition;
@@ -100,7 +100,7 @@ function moveBranchAfterNote(req) {
sql.execute("UPDATE branches SET notePosition = notePosition + 10 WHERE parentNoteId = ? AND notePosition > ? AND isDeleted = 0",
[afterNote.parentNoteId, afterNote.notePosition]);
entityChangesService.addNoteReorderingSync(afterNote.parentNoteId);
entityChangesService.addNoteReorderingEntityChange(afterNote.parentNoteId);
const movedNotePosition = afterNote.notePosition + 10;