renamed dates in code as well

This commit is contained in:
zadam
2019-03-12 20:58:31 +01:00
parent f65fefe7b1
commit 1c41d459f0
29 changed files with 92 additions and 92 deletions

View File

@@ -50,7 +50,7 @@ async function getRecentNotes(currentNoteId) {
AND branches.noteId != ?
${extraCondition}
ORDER BY
dateCreated DESC
utcDateCreated DESC
LIMIT 200`, [currentNoteId]);
return recentNotes.map(rn => {

View File

@@ -48,7 +48,7 @@ async function moveBranchBeforeNote(req) {
return [200, validationResult];
}
// we don't change dateModified so other changes are prioritized in case of conflict
// we don't change utcDateModified so other changes are prioritized in case of conflict
// also we would have to sync all those modified branches otherwise hash checks would fail
await sql.execute("UPDATE branches SET notePosition = notePosition + 1 WHERE parentNoteId = ? AND notePosition >= ? AND isDeleted = 0",
[beforeNote.parentNoteId, beforeNote.notePosition]);
@@ -76,7 +76,7 @@ async function moveBranchAfterNote(req) {
return [200, validationResult];
}
// we don't change dateModified so other changes are prioritized in case of conflict
// we don't change utcDateModified so other changes are prioritized in case of conflict
// also we would have to sync all those modified branches otherwise hash checks would fail
await sql.execute("UPDATE branches SET notePosition = notePosition + 1 WHERE parentNoteId = ? AND notePosition > ? AND isDeleted = 0",
[afterNote.parentNoteId, afterNote.notePosition]);

View File

@@ -3,7 +3,7 @@
const sql = require('../../services/sql');
async function getEventLog() {
return await sql.getRows("SELECT * FROM event_log ORDER BY dateCreated DESC");
return await sql.getRows("SELECT * FROM event_log ORDER BY utcDateCreated DESC");
}
module.exports = {

View File

@@ -4,7 +4,7 @@ const repository = require('../../services/repository');
async function getNoteRevisions(req) {
const noteId = req.params.noteId;
return await repository.getEntities("SELECT * FROM note_revisions WHERE noteId = ? order by dateModifiedTo desc", [noteId]);
return await repository.getEntities("SELECT * FROM note_revisions WHERE noteId = ? order by utcDateModifiedTo desc", [noteId]);
}
module.exports = {

View File

@@ -14,7 +14,7 @@ async function getRecentChanges() {
note_revisions
JOIN notes USING(noteId)
ORDER BY
dateModifiedTo DESC
utcDateModifiedTo DESC
LIMIT 1000`);
for (const change of recentChanges) {