n8n-nodes-tembory 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,8 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.temboryApiRequest = temboryApiRequest;
|
|
4
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
async function getTemboryCredentials(ctx) {
|
|
6
|
+
try {
|
|
7
|
+
return await ctx.getCredentials('temboryApi');
|
|
8
|
+
}
|
|
9
|
+
catch { }
|
|
10
|
+
try {
|
|
11
|
+
return await ctx.getCredentials('mem0Api');
|
|
12
|
+
}
|
|
13
|
+
catch { }
|
|
14
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'Credentials for Tembory are not set. Select a Tembory API credential and save the workflow.');
|
|
15
|
+
}
|
|
5
16
|
async function temboryApiRequest(method, endpoint, body = {}, qs = {}) {
|
|
6
|
-
const credentials = await this
|
|
17
|
+
const credentials = await getTemboryCredentials(this);
|
|
7
18
|
const baseUrl = 'https://api.tembory.com';
|
|
8
19
|
const operation = resolveGatewayOperation(method, endpoint);
|
|
9
20
|
const payload = {
|
package/package.json
CHANGED