summaryrefslogtreecommitdiff
path: root/www/js/DataModel.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2016-12-24 08:00:47 -0500
committerPliable Pixels <pliablepixels@gmail.com>2016-12-24 08:00:47 -0500
commitc6b9e67c448c0b5619857af8e1431703fe15502e (patch)
tree8beb76261397bc785259c1be2d7e680ebc31e2ad /www/js/DataModel.js
parentaf230a2c247f087ef13e4f3a8fbc18ae598089fc (diff)
If API access errors, notify the user with a link to the FAQ #415
Diffstat (limited to 'www/js/DataModel.js')
-rw-r--r--www/js/DataModel.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index d1afce9e..02c719ed 100644
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -1193,11 +1193,13 @@ angular.module('zmApp.controllers')
{
if (success.data.version)
{
+ $rootScope.apiValid = true;
d.resolve(success.data.version);
}
else
{
- d.resolve("0.0.0");
+ $rootScope.apiValid = false;
+ d.reject("-1.-1.-1");
}
return (d.promise);
@@ -1206,6 +1208,7 @@ angular.module('zmApp.controllers')
{
debug("getAPIversion error handler " + JSON.stringify(error));
d.reject("-1.-1.-1");
+ $rootScope.apiValid = false;
return (d.promise);
});
return (d.promise);