1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Support for tags

This commit is contained in:
Laurent Cozic
2017-07-25 19:36:52 +01:00
parent e128077326
commit d5e39d153f
12 changed files with 274 additions and 65 deletions

View File

@ -21,7 +21,7 @@ class Tag extends BaseItem {
return super.serialize(item, 'tag', fieldNames);
}
static async tagNoteIds(tagId) {
static async noteIds(tagId) {
let rows = await this.db().selectAll('SELECT note_id FROM note_tags WHERE tag_id = ?', [tagId]);
let output = [];
for (let i = 0; i < rows.length; i++) {
@ -31,7 +31,7 @@ class Tag extends BaseItem {
}
static async notes(tagId) {
let noteIds = await this.tagNoteIds(tagId);
let noteIds = await this.noteIds(tagId);
if (!noteIds.length) return [];
return Note.search({