From b2ad62461c8993c33068d1b0215f36deba0e1c9f Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Wed, 12 Sep 2018 20:15:20 -0400 Subject: #704 chaining fixes --- www/js/DataModel.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'www/js/DataModel.js') 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"); -- cgit v1.2.3