ETAPI openapi spec WIP

This commit is contained in:
zadam
2022-01-07 23:06:04 +01:00
parent d74371c9f5
commit 2532ea525d
6 changed files with 458 additions and 49 deletions

View File

@@ -18,6 +18,8 @@ const Branch = require('../becca/entities/branch');
const Note = require('../becca/entities/note');
const Attribute = require('../becca/entities/attribute');
// TODO: patch/put note content
function getNewNotePosition(parentNoteId) {
const note = becca.notes[parentNoteId];
@@ -105,7 +107,7 @@ function createNewNote(params) {
if (!params.title || params.title.trim().length === 0) {
throw new Error(`Note title must not be empty`);
}
if (params.content === null || params.content === undefined) {
throw new Error(`Note content must be set`);
}