mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	
		
			
	
	
		
			10 lines
		
	
	
		
			378 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			10 lines
		
	
	
		
			378 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 
								 | 
							
								const repository = require('../../src/services/repository');
							 | 
						||
| 
								 | 
							
								const noteFulltextService = require('../../src/services/note_fulltext');
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								module.exports = async () => {
							 | 
						||
| 
								 | 
							
								    const notes = await repository.getEntities('SELECT * FROM notes WHERE isDeleted = 0 AND isProtected = 0');
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    for (const note of notes) {
							 | 
						||
| 
								 | 
							
								        await noteFulltextService.updateNoteFulltext(note);
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								};
							 |