mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
initial work on note fulltext (schema changes, updating...)
This commit is contained in:
@@ -3,6 +3,7 @@ const log = require('./log');
|
||||
const eventLogService = require('./event_log');
|
||||
const syncTableService = require('./sync_table');
|
||||
const eventService = require('./events');
|
||||
const noteFulltextService = require('../services/note_fulltext');
|
||||
|
||||
async function updateEntity(sync, entity, sourceId) {
|
||||
const {entityName} = sync;
|
||||
@@ -61,6 +62,8 @@ async function updateNote(entity, sourceId) {
|
||||
await syncTableService.addNoteSync(entity.noteId, sourceId);
|
||||
});
|
||||
|
||||
noteFulltextService.triggerNoteFulltextUpdate(entity.noteId);
|
||||
|
||||
log.info("Update/sync note " + entity.noteId);
|
||||
}
|
||||
}
|
||||
@@ -75,6 +78,8 @@ async function updateNoteContent(entity, sourceId) {
|
||||
await sql.replace("note_contents", entity);
|
||||
|
||||
await syncTableService.addNoteContentSync(entity.noteContentId, sourceId);
|
||||
|
||||
noteFulltextService.triggerNoteFulltextUpdate(entity.noteId);
|
||||
});
|
||||
|
||||
log.info("Update/sync note content " + entity.noteContentId);
|
||||
|
||||
Reference in New Issue
Block a user