mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
last_synced is now updated after sync is completed
This commit is contained in:
@@ -4,11 +4,13 @@ const express = require('express');
|
||||
const router = express.Router();
|
||||
const sql = require('../../services/sql');
|
||||
const auth = require('../../services/auth');
|
||||
const utils = require('../../services/utils');
|
||||
|
||||
router.get('/changed/:since', auth.checkApiAuth, async (req, res, next) => {
|
||||
const since = parseInt(req.params.since);
|
||||
|
||||
res.send({
|
||||
'syncTimestamp': utils.nowTimestamp(),
|
||||
'tree': await sql.getResults("select * from notes_tree where date_modified >= ?", [since]),
|
||||
'notes': await sql.getFlattenedResults('note_id', "select note_id from notes where date_modified >= ?", [since]),
|
||||
'audit_log': await sql.getResults("select * from audit_log where date_modified >= ?", [since])
|
||||
|
||||
Reference in New Issue
Block a user