mirror of
https://github.com/leanote/desktop-app.git
synced 2026-01-14 07:04:21 +08:00
国际化, 历史记录无时间
This commit is contained in:
4
src/node_modules/note.js
generated
vendored
4
src/node_modules/note.js
generated
vendored
@@ -177,13 +177,13 @@ var Note = {
|
||||
db.noteHistories.findOne({_id: noteId}, function(err, history) {
|
||||
// 新建之
|
||||
if(!history) {
|
||||
db.noteHistories.insert({_id: noteId, Histories: [content]});
|
||||
db.noteHistories.insert({_id: noteId, Histories: [content], "UpdatedTime": new Date()});
|
||||
}
|
||||
// 更新之
|
||||
else {
|
||||
var histories = history.Histories;
|
||||
histories.push(content);
|
||||
db.noteHistories.update({_id: noteId}, {$set: {Histories: histories}});
|
||||
db.noteHistories.update({_id: noteId}, {$set: {Histories: histories, "UpdatedTime": new Date()}});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user