Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
etapi fix misleading error message
zadam5cbcf6e6be9b
diff --git a/src/etapi/branches.js b/src/etapi/branches.jsindex be6d9f5168..bac4493227 100644--- a/src/etapi/branches.js+++ b/src/etapi/branches.js@@ -2,8 +2,6 @@ const becca = require("../becca/becca");const eu = require("./etapi_utils");const mappers = require("./mappers");const Branch = require("../becca/entities/branch");-const noteService = require("../services/notes");-const TaskContext = require("../services/task_context");const entityChangesService = require("../services/entity_changes");const v = require("./validators");diff --git a/src/etapi/etapi_utils.js b/src/etapi/etapi_utils.jsindex c5b1f43fdb..e07fbb4da2 100644--- a/src/etapi/etapi_utils.js+++ b/src/etapi/etapi_utils.js@@ -106,7 +106,7 @@ function getAndCheckAttribute(attributeId) {function validateAndPatch(target, source, allowedProperties) {for (const key of Object.keys(source)) {if (!(key in allowedProperties)) {- throw new EtapiError(400, "PROPERTY_NOT_ALLOWED", `Property '${key}' is not allowed for PATCH.`);+ throw new EtapiError(400, "PROPERTY_NOT_ALLOWED", `Property '${key}' is not allowed for this method.`);}else {for (const validator of allowedProperties[key]) {