X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=afb-client%2Fapp%2FFrontend%2Fwidgets%2FNotifications%2FTokenRefreshSvc.js;h=2c7c3dac9119fcf27116e4072d7dc383167579b4;hb=a1c9f0e713b2b6e6cd2469fd34de18507b3290c6;hp=3e5e8d6cb22196244225b6b181264d81bda490be;hpb=6d06a2a9a02906ce4c848540d74c3c5798688664;p=src%2Fapp-framework-demo.git diff --git a/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js b/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js index 3e5e8d6..2c7c3da 100644 --- a/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js +++ b/afb-client/app/Frontend/widgets/Notifications/TokenRefreshSvc.js @@ -40,7 +40,7 @@ angular.module('TokenRefresh', ['AppConfig', 'ModalNotification']) scope.logged=undefined; // neither thu neither false $window.onbeforeunload = function () { - AppCall.get ("token", "reset", {/*query*/}, function () { + AppCall.get (scope.plugin, "logout", {/*query*/}, function () { $log.log("OPA exit"); }); }; @@ -68,7 +68,7 @@ angular.module('TokenRefresh', ['AppConfig', 'ModalNotification']) scope.onsuccess = function(jresp, errcode) { if (errcode !== 200 || jresp.request.status !== "success") { - Notification.warning ({message: jresp.request.info, delay: 5000}); + Notification.warning ({message: "auto-connect :" + jresp.request.info, delay: 10000}); scope.offline(); return false; } @@ -111,7 +111,7 @@ angular.module('TokenRefresh', ['AppConfig', 'ModalNotification']) // Initial connection scope.loggin = function() { - AppCall.get (scope.plugin, "login", {token: AppConfig.session.initial}, function(jresp, errcode) { + AppCall.get (scope.plugin, "connect", {token: AppConfig.session.initial}, function(jresp, errcode) { if (!scope.onsuccess (jresp, errcode)) return;