mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 14:25:51 +01:00
small changes to table names (notes_image => note_images etc.)
This commit is contained in:
@@ -10,7 +10,7 @@ const wrap = require('express-promise-wrap').wrap;
|
||||
|
||||
router.get('/:noteId', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
const noteId = req.params.noteId;
|
||||
const history = await sql.getAll("SELECT * FROM notes_history WHERE noteId = ? order by dateModifiedTo desc", [noteId]);
|
||||
const history = await sql.getAll("SELECT * FROM note_revisions WHERE noteId = ? order by dateModifiedTo desc", [noteId]);
|
||||
protected_session.decryptNoteHistoryRows(req, history);
|
||||
|
||||
res.send(history);
|
||||
@@ -20,9 +20,9 @@ router.put('', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
const sourceId = req.headers.sourceId;
|
||||
|
||||
await sql.doInTransaction(async () => {
|
||||
await sql.replace("notes_history", req.body);
|
||||
await sql.replace("note_revisions", req.body);
|
||||
|
||||
await sync_table.addNoteHistorySync(req.body.noteHistoryId, sourceId);
|
||||
await sync_table.addNoteHistorySync(req.body.noteRevisionId, sourceId);
|
||||
});
|
||||
|
||||
res.send();
|
||||
|
||||
Reference in New Issue
Block a user