mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	
		
			
	
	
		
			22 lines
		
	
	
		
			445 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			22 lines
		
	
	
		
			445 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
|  | const shaca = require("./shaca/shaca"); | ||
|  | const shacaLoader = require("./shaca/shaca_loader"); | ||
|  | 
 | ||
|  | function register(router) { | ||
|  |     router.get('/share/:noteId', (req, res, next) => { | ||
|  |         const {noteId} = req.params; | ||
|  | 
 | ||
|  |         shacaLoader.ensureLoad(); | ||
|  | 
 | ||
|  |         if (noteId in shaca.notes) { | ||
|  |             res.send(shaca.notes[noteId].title); | ||
|  |         } | ||
|  |         else { | ||
|  |             res.send("FFF"); | ||
|  |         } | ||
|  |     }); | ||
|  | } | ||
|  | 
 | ||
|  | module.exports = { | ||
|  |     register | ||
|  | } |