UNPKG

@apify/n8n-nodes-apify

Version:
21 lines 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.keyValueStoresRouter = keyValueStoresRouter; const n8n_workflow_1 = require("n8n-workflow"); const index_1 = require("./index"); const get_key_value_store_record_1 = require("./get-key-value-store-record"); const execute_1 = require("./get-key-value-store-record/execute"); async function keyValueStoresRouter(i) { const resource = this.getNodeParameter('resource', i); const operation = this.getNodeParameter('operation', i); if (resource !== index_1.name) { throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Resource ${resource} is not valid for ${index_1.name}. Please use correct resource.`); } switch (operation) { case get_key_value_store_record_1.name: return await execute_1.getKeyValueStoreRecord.call(this, i); default: throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Operation ${operation} not found`); } } //# sourceMappingURL=router.js.map