mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	
		
			
	
	
		
			19 lines
		
	
	
		
			378 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			19 lines
		
	
	
		
			378 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
|  | const sql = require('./sql'); | ||
|  | const utils = require('./utils'); | ||
|  | 
 | ||
|  | async function addEvent(comment) { | ||
|  |     await addNoteEvent(null, comment); | ||
|  | } | ||
|  | 
 | ||
|  | async function addNoteEvent(noteId, comment) { | ||
|  |     await sql.insert('event_log', { | ||
|  |        note_id : noteId, | ||
|  |        comment: comment, | ||
|  |        date_added: utils.nowTimestamp() | ||
|  |     }); | ||
|  | } | ||
|  | 
 | ||
|  | module.exports = { | ||
|  |     addEvent, | ||
|  |     addNoteEvent | ||
|  | }; |