laravel-request 1.1.17 → 1.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Api.js +2 -2
package/package.json
CHANGED
package/src/Api.js
CHANGED
|
@@ -9,7 +9,7 @@ export default class Api {
|
|
|
9
9
|
*/
|
|
10
10
|
static requestClass = ApiRequest;
|
|
11
11
|
|
|
12
|
-
static tokenResolver = () =>
|
|
12
|
+
static tokenResolver = async () =>
|
|
13
13
|
{
|
|
14
14
|
return localStorage.getItem('api_token');
|
|
15
15
|
}
|
|
@@ -152,7 +152,7 @@ export default class Api {
|
|
|
152
152
|
try {
|
|
153
153
|
headers['Content-Type'] = 'application/json';
|
|
154
154
|
|
|
155
|
-
let api_token = Api.tokenResolver();
|
|
155
|
+
let api_token = await Api.tokenResolver();
|
|
156
156
|
if (api_token)
|
|
157
157
|
{
|
|
158
158
|
headers["Authorization"] = api_token;
|