summaryrefslogtreecommitdiff
path: root/www/js/PortalLoginCtrl.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/PortalLoginCtrl.js')
-rw-r--r--www/js/PortalLoginCtrl.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/www/js/PortalLoginCtrl.js b/www/js/PortalLoginCtrl.js
index ae75d197..422c18ab 100644
--- a/www/js/PortalLoginCtrl.js
+++ b/www/js/PortalLoginCtrl.js
@@ -18,12 +18,21 @@ console.log ("***** INSIDE LOGIN CONTROLLER");
if (ZMDataModel.isLoggedIn()) {
ZMDataModel.zmLog ("User credentials are provided");
// console.log("VALID CREDENTIALS. Grabbing Monitors");
- zmAutoLogin.doLogin("Logging into ZoneMinder...")
- .then (function(data)
+ zmAutoLogin.doLogin("authenticating...")
+ .then (function(data) // success
{
ZMDataModel.getKeyConfigParams(1);
$state.go('montage');
- });
+ },
+ // coming here means auth error
+ // so go back to login
+ function (error)
+ {
+ $state.go('login');
+ }
+
+
+ );
}
else
{