From 8dd354e1d4452d0429778a472bb9c4b80a4ff663 Mon Sep 17 00:00:00 2001 From: Tiago Farto Date: Thu, 21 Dec 2023 17:07:55 +0000 Subject: [PATCH 1/3] chore: fix undefined location --- src/client.ts | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/client.ts b/src/client.ts index 4578a8df..69f746e2 100644 --- a/src/client.ts +++ b/src/client.ts @@ -237,7 +237,10 @@ export class StreamClient 0) { + this.location = location; + } this.baseUrl = this.getBaseUrl(); if (typeof process !== 'undefined') { @@ -572,15 +575,20 @@ export class StreamClient = { + api_key: this.apiKey, + ...(kwargs.qs || {}), + }; + + if (this.group) { + params.location = this.group; + } + return { method, url: this.enrichUrl(kwargs.url, kwargs.serviceName), data: kwargs.body, - params: { - api_key: this.apiKey, - location: this.group, - ...(kwargs.qs || {}), - }, + params, headers: { 'X-Stream-Client': this.userAgent(), 'stream-auth-type': 'jwt', From 0a6b50c0dc60d0dbf4cd8fd808158c7aad127781 Mon Sep 17 00:00:00 2001 From: Tiago Farto Date: Thu, 21 Dec 2023 17:12:03 +0000 Subject: [PATCH 2/3] chore: fix type --- src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 69f746e2..e5ce2f2d 100644 --- a/src/client.ts +++ b/src/client.ts @@ -156,7 +156,7 @@ export class StreamClient> | null; browser: boolean; node: boolean; From 9f2a3ba95577ee7e276097bea10077e089c540cd Mon Sep 17 00:00:00 2001 From: Tiago Farto Date: Fri, 22 Dec 2023 13:42:17 +0000 Subject: [PATCH 3/3] chore: fix length --- src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index e5ce2f2d..780611f5 100644 --- a/src/client.ts +++ b/src/client.ts @@ -238,7 +238,7 @@ export class StreamClient 0) { + if (location) { this.location = location; } this.baseUrl = this.getBaseUrl();