mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 03:29:02 +01:00 
			
		
		
		
	fix updating non-text notes
This commit is contained in:
		
							parent
							
								
									371f174756
								
							
						
					
					
						commit
						4d5612e845
					
				| @ -55,10 +55,10 @@ function createNote(req) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function updateNoteData(req) { | function updateNoteData(req) { | ||||||
|     const {content, attachments} = req.body; |     const {content} = req.body; | ||||||
|     const {noteId} = req.params; |     const {noteId} = req.params; | ||||||
| 
 | 
 | ||||||
|     return noteService.updateNoteData(noteId, content, attachments); |     return noteService.updateNoteData(noteId, content); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function deleteNote(req) { | function deleteNote(req) { | ||||||
|  | |||||||
| @ -575,12 +575,12 @@ function downloadImages(noteId, content) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function saveLinks(note, content) { | function saveLinks(note, content) { | ||||||
|     if (note.type !== 'text' && note.type !== 'relationMap') { |     if ((note.type !== 'text' && note.type !== 'relationMap') | ||||||
|         return content; |         || (note.isProtected && !protectedSessionService.isProtectedSessionAvailable())) { | ||||||
|     } |         return { | ||||||
| 
 |             forceFrontendReload: false, | ||||||
|     if (note.isProtected && !protectedSessionService.isProtectedSessionAvailable()) { |             content | ||||||
|         return content; |         }; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     const foundLinks = []; |     const foundLinks = []; | ||||||
| @ -599,7 +599,7 @@ function saveLinks(note, content) { | |||||||
|         findRelationMapLinks(content, foundLinks); |         findRelationMapLinks(content, foundLinks); | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|         throw new Error(`Unrecognized type ${note.type}`); |         throw new Error(`Unrecognized type '${note.type}'`); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     const existingLinks = note.getRelations().filter(rel => |     const existingLinks = note.getRelations().filter(rel => | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam