From 543b0ddefe5e12c34d8f0363dd9b93cfc9a89914 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 12 Oct 2019 20:14:33 -0400 Subject: [PATCH] [U] Update http-utils to use token.token --- src/utils/http-utils.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/utils/http-utils.ts b/src/utils/http-utils.ts index c4bc537..5b9f0cb 100644 --- a/src/utils/http-utils.ts +++ b/src/utils/http-utils.ts @@ -1,10 +1,11 @@ import Constants from '@/constants'; +import {Token} from '@/components/app/app'; export class HttpUtils { - public token: string = ''; + public token: Token; - constructor (token: string) + constructor (token: Token) { this.token = token; } @@ -12,7 +13,10 @@ export class HttpUtils public post(node: string, body: any): Promise { // Add token - if (this.token != '') body['token'] = this.token; + if (this.token != null) + { + body['token'] = this.token.token; + } // Create promise return new Promise((resolve, reject) =>