UNPKG

n8n-nodes-feegow

Version:
21 lines 698 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.feegowRequest = feegowRequest; async function feegowRequest(method, endpoint, body = {}, qs = {}) { const { token } = await this.getCredentials('feegowApi'); const options = { method, url: `https://api.feegow.com/v1${endpoint}`, headers: { 'x-access-token': token }, json: true, body: method === 'GET' ? undefined : body, qs, }; try { return await this.helpers.request(options); } catch (error) { throw new Error(`Erro na requisição à API do Feegow: ${error.message}`); } } //# sourceMappingURL=GenericFunctions.js.map