mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
converted settings, note revisions, password change and recent changes routes
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const sql = require('../../services/sql');
|
||||
const auth = require('../../services/auth');
|
||||
const wrap = require('express-promise-wrap').wrap;
|
||||
|
||||
router.get('/', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
async function getRecentChanges() {
|
||||
const recentChanges = await sql.getRows(
|
||||
`SELECT
|
||||
notes.isDeleted AS current_isDeleted,
|
||||
@@ -19,7 +15,9 @@ router.get('/', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
dateModifiedTo DESC
|
||||
LIMIT 1000`);
|
||||
|
||||
res.send(recentChanges);
|
||||
}));
|
||||
return recentChanges;
|
||||
}
|
||||
|
||||
module.exports = router;
|
||||
module.exports = {
|
||||
getRecentChanges
|
||||
};
|
||||
Reference in New Issue
Block a user