国际化, 历史记录无时间

This commit is contained in:
life
2015-04-12 11:37:17 +08:00
parent 653894bb5d
commit c5dc0651a8
7 changed files with 75 additions and 37 deletions

4
src/node_modules/note.js generated vendored
View File

@@ -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()}});
}
});
},