mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
reorganization of source code
This commit is contained in:
14
routes/api/note_history.js
Normal file
14
routes/api/note_history.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const sql = require('../../services/sql');
|
||||
const auth = require('../../services/auth');
|
||||
|
||||
router.get('/:noteId', auth.checkApiAuth, async (req, res, next) => {
|
||||
const noteId = req.params.noteId;
|
||||
|
||||
const history = await sql.getResults("select * from notes_history where note_id = ? order by date_modified desc", [noteId]);
|
||||
|
||||
res.send(history);
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user