mirror of
https://github.com/zadam/trilium.git
synced 2026-02-21 13:57:04 +01:00
ETAPI method to create note revision, #3509
This commit is contained in:
@@ -8,6 +8,7 @@ const v = require("./validators");
|
||||
const searchService = require("../services/search/services/search");
|
||||
const SearchContext = require("../services/search/search_context");
|
||||
const zipExportService = require("../services/export/zip");
|
||||
const noteRevisionService = require("../services/note_revisions.js");
|
||||
|
||||
function register(router) {
|
||||
eu.route(router, 'get', '/etapi/notes', (req, res, next) => {
|
||||
@@ -143,6 +144,14 @@ function register(router) {
|
||||
|
||||
zipExportService.exportToZip(taskContext, branch, format, res);
|
||||
});
|
||||
|
||||
eu.route(router, 'post' ,'/etapi/notes/:noteId/note-revision', (req, res, next) => {
|
||||
const note = eu.getAndCheckNote(req.params.noteId);
|
||||
|
||||
note.saveNoteRevision();
|
||||
|
||||
return res.sendStatus(204);
|
||||
});
|
||||
}
|
||||
|
||||
function parseSearchParams(req) {
|
||||
|
||||
Reference in New Issue
Block a user