Browse Source

Merge pull request #101 from Haktrum/login-to-im-98

Fix to #98 - Redirecting to /im from /login if already logged in
master
Igor Zhukov 11 years ago
parent
commit
f54fd93faa
  1. 6
      app/js/controllers.js

6
app/js/controllers.js

@ -22,6 +22,12 @@ angular.module('myApp.controllers', []) @@ -22,6 +22,12 @@ angular.module('myApp.controllers', [])
})
.controller('AppLoginController', function ($scope, $location, $timeout, MtpApiManager, ErrorService) {
MtpApiManager.getUserID().then(function (id) {
if (id) {
$location.url('/im');
return;
}
});
var options = {dcID: 1};
$scope.credentials = {};

Loading…
Cancel
Save