UNPKG

@apify/n8n-nodes-apify

Version:
21 lines 964 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.datasetsRouter = datasetsRouter; const n8n_workflow_1 = require("n8n-workflow"); const index_1 = require("./index"); const get_items_1 = require("./get-items"); const execute_1 = require("./get-items/execute"); async function datasetsRouter(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_items_1.name: return await execute_1.getItems.call(this, i); default: throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Operation ${operation} not found. Please use correct operation.`); } } //# sourceMappingURL=router.js.map