From 2bf1cd32031020806001cfa5606a37e9a624cca6 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sat, 14 Jul 2018 18:42:16 -0400 Subject: abstract out loginAPI zm version --- www/js/DataModel.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'www/js/DataModel.js') 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') -- cgit v1.2.3