From a10e4ec264da6b07dd225bfe71b69de0d1c19052 Mon Sep 17 00:00:00 2001 From: Saad Jutt Date: Fri, 5 Feb 2021 19:03:20 +0500 Subject: [PATCH] fix(*): fix invalid typing --- src/SASViyaApiClient.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SASViyaApiClient.ts b/src/SASViyaApiClient.ts index 1a3b95a..3d3d5ab 100644 --- a/src/SASViyaApiClient.ts +++ b/src/SASViyaApiClient.ts @@ -670,7 +670,7 @@ export class SASViyaApiClient { clientSecret: string, authCode: string, insecure: boolean = false - ) { + ): Promise { const url = this.serverUrl + '/SASLogon/oauth/token' let token if (typeof Buffer === 'undefined') { @@ -694,14 +694,14 @@ export class SASViyaApiClient { } const authResponse = await this.requestClient - .post( + .post( url, formData, undefined, 'multipart/form-data; boundary=' + (formData as any)._boundary, headers ) - .then((res) => res.result) + .then((res) => res.result as SasAuthResponse) return authResponse }