n8n-nodes-base
Version:
Base nodes of n8n
23 lines • 1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.execute = execute;
const helpers_1 = require("../helpers");
async function execute(i) {
const credentialType = (0, helpers_1.getActiveCredentialType)(this, i);
const host = await (0, helpers_1.getHost)(this, credentialType);
const catalogName = (0, helpers_1.extractResourceLocatorValue)(this.getNodeParameter('catalogName', i, ''));
const schemaName = (0, helpers_1.extractResourceLocatorValue)(this.getNodeParameter('schemaName', i, ''));
const qs = {};
if (catalogName)
qs.catalog_name = catalogName;
if (schemaName)
qs.schema_name = schemaName;
const response = await this.helpers.httpRequestWithAuthentication.call(this, credentialType, {
method: 'GET',
url: `${host}/api/2.1/unity-catalog/volumes`,
qs,
json: true,
});
return [{ json: response, pairedItem: { item: i } }];
}
//# sourceMappingURL=listVolumes.operation.js.map