[-] Revert "[U] Update http-utils to use token.token"
This reverts commit 543b0ddefe.
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
import Constants from '@/constants';
|
import Constants from '@/constants';
|
||||||
import {Token} from '@/components/app/app';
|
|
||||||
|
|
||||||
export class HttpUtils
|
export class HttpUtils
|
||||||
{
|
{
|
||||||
public token: Token;
|
public token: string = '';
|
||||||
|
|
||||||
constructor (token: Token)
|
constructor (token: string)
|
||||||
{
|
{
|
||||||
this.token = token;
|
this.token = token;
|
||||||
}
|
}
|
||||||
@@ -13,10 +12,7 @@ export class HttpUtils
|
|||||||
public post(node: string, body: any): Promise<any>
|
public post(node: string, body: any): Promise<any>
|
||||||
{
|
{
|
||||||
// Add token
|
// Add token
|
||||||
if (this.token != null)
|
if (this.token != '') body['token'] = this.token;
|
||||||
{
|
|
||||||
body['token'] = this.token.token;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create promise
|
// Create promise
|
||||||
return new Promise<any>((resolve, reject) =>
|
return new Promise<any>((resolve, reject) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user