From c6b9e67c448c0b5619857af8e1431703fe15502e Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sat, 24 Dec 2016 08:00:47 -0500 Subject: If API access errors, notify the user with a link to the FAQ #415 --- www/js/DataModel.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'www/js/DataModel.js') 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); -- cgit v1.2.3