mirror of
https://github.com/leanote/desktop-app.git
synced 2025-12-21 01:07:43 +08:00
notebook,note, tag OK
This commit is contained in:
9
node_modules/note.js
generated
vendored
9
node_modules/note.js
generated
vendored
@@ -1,6 +1,7 @@
|
||||
var db = require('db');
|
||||
var User = require('user');
|
||||
var Notebook = require('notebook');
|
||||
var Tag = require('tag');
|
||||
var Notes = db.notes;
|
||||
|
||||
function log(o) {
|
||||
@@ -50,6 +51,10 @@ var Note = {
|
||||
|
||||
// 重新统计笔记本的笔记数量
|
||||
Notebook.reCountNotebookNumberNotes(noteOrContent.NotebookId);
|
||||
// 标签
|
||||
if(noteOrContent.Tags && noteOrContent.Tags.length > 0) {
|
||||
Tag.addTags(noteOrContent.Tags);
|
||||
}
|
||||
}
|
||||
});
|
||||
// 更新笔记
|
||||
@@ -73,6 +78,10 @@ var Note = {
|
||||
callback && callback(false);
|
||||
} else {
|
||||
callback && callback(noteOrContent);
|
||||
// 标签
|
||||
if(noteOrContent.Tags && noteOrContent.Tags.length > 0) {
|
||||
Tag.addTags(noteOrContent.Tags);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user