merge fixes

This commit is contained in:
zadam 2021-05-08 11:20:20 +02:00
parent 051b9dff21
commit 2edc7dbf58
5 changed files with 577 additions and 10626 deletions

11176
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -42,8 +42,8 @@
"express": "4.17.1",
"express-partial-content": "^1.0.2",
"express-session": "1.17.1",
"fs-extra": "9.1.0",
"helmet": "4.5.0",
"fs-extra": "10.0.0",
"helmet": "4.6.0",
"html": "1.0.0",
"html2plaintext": "2.1.2",
"http-proxy-agent": "4.0.1",

View file

@ -3,8 +3,6 @@ import noteAttributeCache from "../services/note_attribute_cache.js";
import ws from "../services/ws.js";
import options from "../services/options.js";
import froca from "../services/froca.js";
import treeCache from "../services/tree_cache.js";
import bundle from "../services/bundle.js";
const LABEL = 'label';
const RELATION = 'relation';

View file

@ -12,7 +12,6 @@ const sqlInit = require('../../services/sql_init');
const sql = require('../../services/sql');
const optionService = require('../../services/options');
const ApiToken = require('../../services/becca/entities/api_token.js');
const ApiToken = require('../../entities/api_token');
const ws = require("../../services/ws.js");
function loginSync(req) {

View file

@ -56,7 +56,19 @@ class Becca {
}
getNotes(noteIds) {
return this.notes.filter(note => noteIds.includes(note.noteId));
const filteredNotes = [];
for (const noteId of noteIds) {
const note = this.notes[noteId];
if (!note) {
throw new Error(`Note '${noteId}' was not found in becca.`);
}
filteredNotes.push(note);
}
return filteredNotes;
}
getBranch(branchId) {