mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	we now remember past source ids so app restart won't change anything in sync operation
This commit is contained in:
		| @@ -5,6 +5,7 @@ const router = express.Router(); | ||||
| const sql = require('../../services/sql'); | ||||
| const auth = require('../../services/auth'); | ||||
| const utils = require('../../services/utils'); | ||||
| const sync_table = require('../../services/sync_table'); | ||||
|  | ||||
| router.get('', auth.checkApiAuth, async (req, res, next) => { | ||||
|     res.send(await getRecentNotes()); | ||||
| @@ -17,7 +18,7 @@ router.put('/:noteId', auth.checkApiAuth, async (req, res, next) => { | ||||
|         is_deleted: 0 | ||||
|     }); | ||||
|  | ||||
|     await sql.addRecentNoteSync(req.params.noteId); | ||||
|     await sync_table.addRecentNoteSync(req.params.noteId); | ||||
|  | ||||
|     res.send(await getRecentNotes()); | ||||
| }); | ||||
| @@ -25,7 +26,7 @@ router.put('/:noteId', auth.checkApiAuth, async (req, res, next) => { | ||||
| router.delete('/:noteId', auth.checkApiAuth, async (req, res, next) => { | ||||
|     await sql.execute('UPDATE recent_notes SET is_deleted = 1 WHERE note_id = ?', [req.params.noteId]); | ||||
|  | ||||
|     await sql.addRecentNoteSync(req.params.noteId); | ||||
|     await sync_table.addRecentNoteSync(req.params.noteId); | ||||
|  | ||||
|     res.send(await getRecentNotes()); | ||||
| }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user