trilium/routes/api/recent_changes.js
2017-11-20 23:51:28 -05:00

14 lines
No EOL
416 B
JavaScript

"use strict";
const express = require('express');
const router = express.Router();
const sql = require('../../services/sql');
const auth = require('../../services/auth');
router.get('/', auth.checkApiAuth, async (req, res, next) => {
const recentChanges = await sql.getResults("SELECT * FROM notes_history order by date_modified_to desc limit 1000");
res.send(recentChanges);
});
module.exports = router;