mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08:00 
			
		
		
		
	fix "clone note after"
This commit is contained in:
		
							parent
							
								
									bdf42749f3
								
							
						
					
					
						commit
						f82e99b5ed
					
				| @ -3,16 +3,14 @@ | |||||||
| const cloningService = require('../../services/cloning'); | const cloningService = require('../../services/cloning'); | ||||||
| 
 | 
 | ||||||
| async function cloneNoteToParent(req) { | async function cloneNoteToParent(req) { | ||||||
|     const noteId = req.params.noteId; |     const {noteId, parentNoteId} = req.params; | ||||||
|     const parentNoteId = req.params.parentNoteId; |     const {prefix} = req.body; | ||||||
|     const prefix = req.body.prefix; |  | ||||||
| 
 | 
 | ||||||
|     return await cloningService.cloneNoteToParent(noteId, parentNoteId, prefix); |     return await cloningService.cloneNoteToParent(noteId, parentNoteId, prefix); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| async function cloneNoteAfter(req) { | async function cloneNoteAfter(req) { | ||||||
|     const noteId = req.params.noteId; |     const {noteId, afterBranchId} = req.params; | ||||||
|     const afterBranchId = req.params.afterBranchId; |  | ||||||
| 
 | 
 | ||||||
|     return await cloningService.cloneNoteAfter(noteId, afterBranchId); |     return await cloningService.cloneNoteAfter(noteId, afterBranchId); | ||||||
| } | } | ||||||
|  | |||||||
| @ -75,7 +75,7 @@ async function cloneNoteAfter(noteId, afterBranchId) { | |||||||
| 
 | 
 | ||||||
|     const validationResult = await treeService.validateParentChild(afterNote.parentNoteId, noteId); |     const validationResult = await treeService.validateParentChild(afterNote.parentNoteId, noteId); | ||||||
| 
 | 
 | ||||||
|     if (!validationResult.result) { |     if (!validationResult.success) { | ||||||
|         return validationResult; |         return validationResult; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam