mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 17:25:52 +01:00
refactoring + uploading attachments WIP
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
const sql = require('../../services/sql');
|
||||
const becca = require("../../becca/becca");
|
||||
const NotFoundError = require("../../errors/not_found_error");
|
||||
|
||||
function getSchema() {
|
||||
const tableNames = sql.getColumn(`SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%' ORDER BY name`);
|
||||
@@ -19,11 +18,7 @@ function getSchema() {
|
||||
}
|
||||
|
||||
function execute(req) {
|
||||
const note = becca.getNote(req.params.noteId);
|
||||
|
||||
if (!note) {
|
||||
throw new NotFoundError(`Note '${req.params.noteId}' was not found.`);
|
||||
}
|
||||
const note = becca.getNoteOrThrow(req.params.noteId);
|
||||
|
||||
const queries = note.getContent().split("\n---");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user