diff options
Diffstat (limited to 'src/clients/api_client.ts')
-rw-r--r-- | src/clients/api_client.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/clients/api_client.ts b/src/clients/api_client.ts index 4362c4d..81ae482 100644 --- a/src/clients/api_client.ts +++ b/src/clients/api_client.ts @@ -54,6 +54,14 @@ export class ApiClient { return [product_response, product_reviews]; } + authorizationHeaders() { + return { + headers: { + Authorization: `Bearer ${this.token.get()}` + } + }; + } + private async makeGetRequest(request_url: string, headers?: object) { try { const response = await axios.get(request_url, headers); @@ -63,12 +71,4 @@ export class ApiClient { return error; } } - - private authorizationHeaders() { - return { - headers: { - Authorization: `Bearer ${this.token.get()}` - } - }; - } }
\ No newline at end of file |