mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
renamed dates in code as well
This commit is contained in:
@@ -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 => {
|
||||
|
||||
@@ -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]);
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user