mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	refactoring of note update
This commit is contained in:
		
							
								
								
									
										15
									
								
								src/entities/note_image.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/entities/note_image.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| "use strict"; | ||||
|  | ||||
| const Entity = require('./entity'); | ||||
| const repository = require('../services/repository'); | ||||
|  | ||||
| class NoteImage extends Entity { | ||||
|     static get tableName() { return "note_images"; } | ||||
|     static get primaryKeyName() { return "noteImageId"; } | ||||
|  | ||||
|     async getNote() { | ||||
|         return await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]); | ||||
|     } | ||||
| } | ||||
|  | ||||
| module.exports = NoteImage; | ||||
		Reference in New Issue
	
	Block a user