summaryrefslogtreecommitdiff
path: root/www/js/DataModel.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-09-12 20:15:20 -0400
committerPliable Pixels <pliablepixels@gmail.com>2018-09-12 20:15:20 -0400
commitb2ad62461c8993c33068d1b0215f36deba0e1c9f (patch)
tree605ed1945cd2a55b10437b037fd465bade7e6a0f /www/js/DataModel.js
parent7025aa4ec599593a80e2d3c2249b49eae7ef9f6a (diff)
#704 chaining fixes
Diffstat (limited to 'www/js/DataModel.js')
-rw-r--r--www/js/DataModel.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 78135987..673740ff 100644
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -1707,15 +1707,17 @@ angular.module('zmApp.controllers')
// returns API version or none
//-------------------------------------------------------
getAPIversion: function () {
- debug("getAPIversion called");
+
var d = $q.defer();
var apiurl = loginData.apiurl + '/host/getVersion.json';
+ debug("getAPIversion called with "+apiurl);
$http.get(apiurl)
.then(function (success) {
if (success.data.version) {
// console.log ("API VERSION RETURNED: " + JSON.stringify(success));
$rootScope.apiValid = true;
setCurrentServerVersion(success.data.version);
+ debug("getAPI version succeded with "+success.data.version);
d.resolve(success.data.version);
} else {
debug("Setting APIValid to false as API version was not retrieved");