appscode-api-js-client
Advanced tools
Comparing version 1.0.16 to 1.0.17
@@ -28,6 +28,8 @@ var RSVP = require('rsvp'); | ||
function checkAuth(resp) { | ||
function checkStatus(resp) { | ||
return new RSVP.Promise(function (resolve, reject) { | ||
if (resp.status.code === "2") { // UNAUTHORIZED | ||
Window.location.replace("/"); | ||
} else if (resp.status.code !== "0") { // not OK | ||
reject(resp); | ||
} | ||
@@ -40,3 +42,3 @@ resolve(resp); | ||
ensureCsrfToken: ensureCsrfToken, | ||
checkAuth: checkAuth | ||
checkStatus: checkStatus | ||
}; |
{ | ||
"name": "appscode-api-js-client", | ||
"version": "1.0.16", | ||
"version": "1.0.17", | ||
"description": "AppsCode API JavaScript Client", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
117832
4149