mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	set clip type from the incoming param
This commit is contained in:
		@@ -47,13 +47,13 @@ async function addClipping(req) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
async function createNote(req) {
 | 
					async function createNote(req) {
 | 
				
			||||||
    const {title, content, pageUrl, images} = req.body;
 | 
					    const {title, content, pageUrl, images, clipType} = req.body;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const todayNote = await dateNoteService.getDateNote(dateUtils.localNowDate());
 | 
					    const todayNote = await dateNoteService.getDateNote(dateUtils.localNowDate());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const {note} = await noteService.createNote(todayNote.noteId, title, content);
 | 
					    const {note} = await noteService.createNote(todayNote.noteId, title, content);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    await note.setLabel('clipType', 'note');
 | 
					    await note.setLabel('clipType', clipType);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (pageUrl) {
 | 
					    if (pageUrl) {
 | 
				
			||||||
        await note.setLabel('pageUrl', pageUrl);
 | 
					        await note.setLabel('pageUrl', pageUrl);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user