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

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) {