@automattic/vip
Advanced tools
Comparing version 1.0.0-dev-build3 to 1.0.0-dev-build4
@@ -12,7 +12,9 @@ require('isomorphic-fetch'); | ||
const token = await Token.get(); | ||
const headers = { | ||
Authorization: `Bearer ${token.raw}` | ||
}; | ||
const headers = {}; | ||
if (token) { | ||
headers.Authorization = `Bearer ${token.raw}`; | ||
} | ||
return new FetchQL({ url: API_URL, headers: headers }); | ||
}; |
@@ -43,3 +43,3 @@ const args = require('args'); | ||
if (!apps.apps || apps.apps.length !== 1) { | ||
if (!apps || !apps.apps || apps.apps.length !== 1) { | ||
return console.log('Please specify the app with --app'); | ||
@@ -56,3 +56,3 @@ } | ||
if (!res) { | ||
if (!res || !res.data || !res.data.apps || !res.data.apps.length) { | ||
return console.log(`App ${app.blue} does not exist`); | ||
@@ -59,0 +59,0 @@ } |
{ | ||
"name": "@automattic/vip", | ||
"version": "1.0.0-dev-build3", | ||
"version": "1.0.0-dev-build4", | ||
"description": "The VIP Go Javascript library & CLI", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17666
416