summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-07-24 11:02:19 -0400
committerPliable Pixels <pliablepixels@gmail.com>2018-07-24 11:02:19 -0400
commit3b829d0411ac491720ea563017875eaf6a8de327 (patch)
tree658ed49313840c7e80039f576454aede0314fdfc
parent9c28b510df564f6e0e4787202d7efd31796682e6 (diff)
fix "no such state invalidapi" and other api auth border cases
-rw-r--r--config.xml2
-rwxr-xr-xwww/js/DataModel.js1
-rwxr-xr-xwww/js/app.js3
3 files changed, 4 insertions, 2 deletions
diff --git a/config.xml b/config.xml
index 53d701c5..c5fc239f 100644
--- a/config.xml
+++ b/config.xml
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
-<widget android-packageName="com.pliablepixels.zmninja_pro" id="com.pliablepixels.zmninjapro" ios-CFBundleIdentifier="com.pliablepixels.zmninja-pro" version="1.3.009" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget android-packageName="com.pliablepixels.zmninja_pro" id="com.pliablepixels.zmninjapro" ios-CFBundleIdentifier="com.pliablepixels.zmninja-pro" version="1.3.010" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>zmNinja</name>
<description>
High performance ZoneMinder client
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index b86c6f08..2e7279ad 100755
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -1594,6 +1594,7 @@ angular.module('zmApp.controllers')
setCurrentServerVersion(success.data.version);
d.resolve(success.data.version);
} else {
+ debug ("Setting APIValid to false as API version was not retrieved");
$rootScope.apiValid = false;
setCurrentServerVersion("");
d.reject("-1.-1.-1");
diff --git a/www/js/app.js b/www/js/app.js
index 87f40674..c5c9c8ba 100755
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -1018,7 +1018,8 @@ angular.module('zmApp', [
// This is a good time to check if auth is used :-p
if (!ld.isUseAuth) {
- NVRDataModel.log("Auth is disabled, setting authSession to ''");
+ NVRDataModel.log("Auth is disabled, setting authSession to empty");
+ $rootScope.apiValid = true;
$rootScope.authSession = '';
d.resolve("Login Success");