From 40e06cfed610b5f41de63f90aa32293d3e51806f Mon Sep 17 00:00:00 2001 From: peepopoggers <72892531+peepopoggers@users.noreply.github.com> Date: Thu, 21 Jan 2021 22:24:08 +0000 Subject: [PATCH] Support For Linear and Bugfix for setTimeout --- src/util/requestWrapper.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/util/requestWrapper.ts b/src/util/requestWrapper.ts index cf5c71c..4987ef5 100644 --- a/src/util/requestWrapper.ts +++ b/src/util/requestWrapper.ts @@ -10,6 +10,7 @@ export default class RequestUtil { private globalRequestOptions: AxiosRequestConfig; private key: string | undefined; private secret: string | undefined; + //all private constructor( key: string | undefined, @@ -68,9 +69,15 @@ export default class RequestUtil { * @private Make a HTTP request to a specific endpoint. Private endpoints are automatically signed. */ async _call(method: Method, endpoint: string, params?: any): GenericAPIResponse { - const publicEndpoint = endpoint.startsWith('v2/public'); + let publicEndpoint = false; + if(endpoint.startsWith('v2/public')){ + publicEndpoint = true; + } + else if(endpoint.startsWith('public/linear/')){ + publicEndpoint = true; + } - if (!publicEndpoint) { + if (publicEndpoint == false) { if (!this.key || !this.secret) { throw new Error('Private endpoints require api and private keys set'); } @@ -101,7 +108,7 @@ export default class RequestUtil { } throw response; - }).catch(e => this.parseException(e)); + }).catch(this.parseException); } /**