summaryrefslogtreecommitdiff
path: root/www/js/DataModel.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-07-14 18:42:16 -0400
committerPliable Pixels <pliablepixels@gmail.com>2018-07-14 18:42:16 -0400
commit2bf1cd32031020806001cfa5606a37e9a624cca6 (patch)
tree5b89ae422d97079dbb2a029d86d31f945058793a /www/js/DataModel.js
parent142b46cacf19bbe8c4deef8492a6392b80e4325d (diff)
abstract out loginAPI zm version
Diffstat (limited to 'www/js/DataModel.js')
-rwxr-xr-xwww/js/DataModel.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 2323c27e..78d24772 100755
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -346,9 +346,7 @@ angular.module('zmApp.controllers')
return d.promise;
}
- // disable for now, getAuthHash needs work
-
- if (versionCompare(currentServerVersion, "1.31.44") != -1 || loginData.loginAPISupported) {
+ if (versionCompare(currentServerVersion, zm.versionWithLoginAPI) != -1 || loginData.loginAPISupported) {
myurl = loginData.apiurl + '/host/getCredentials.json';
debug("Server version > 1.31.41, so using getCredentials API:" + myurl);
@@ -384,7 +382,7 @@ angular.module('zmApp.controllers')
return d.promise;
}
- //currentServerVersion
+ //old way without login API
var as = 'undefined';
@@ -2638,7 +2636,7 @@ angular.module('zmApp.controllers')
$rootScope.authSession = "undefined";
- if (versionCompare(currentServerVersion, "1.31.44") != -1 || loginData.loginAPISupported) {
+ if (versionCompare(currentServerVersion, zm.versionWithLoginAPI) != -1 || loginData.loginAPISupported) {
debug ("Logging out using API method");
$http.get(loginData.apiurl+'/host/logout.json')