Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

fix to use NPM package #182

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion LUIS/lib/api/serviceBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
const {insertParametersFromObject} = require('../utils/insertParametersFromObject');
const deriveParamsFromPath = require('../utils/deriveParamsFromPath');

const fetch = require('node-fetch');
/**
* Base class for all services
*/
Expand Down Expand Up @@ -33,6 +33,7 @@ class ServiceBase {
* @returns {Promise<Response>} The promise representing the request
*/
createRequest(pathFragment, params, method, dataModel = null) {
if (params) Object.assign(ServiceBase.config,params);
const {commonHeaders: headers, endpoint} = this;
const {endpointBasePath, appId, versionId} = ServiceBase.config;
const tokenizedUrl = endpointBasePath + endpoint + pathFragment;
Expand Down