Fix to #98 - Redirecting to /im from /login if already logged in

This commit is contained in:
Haktrum 2014-02-26 18:16:32 -03:00
parent ff0d445c77
commit 3ee7ea5f76

View File

@ -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 = {};