Browse Source

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

master
Haktrum 11 years ago
parent
commit
3ee7ea5f76
  1. 6
      app/js/controllers.js

6
app/js/controllers.js

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

Loading…
Cancel
Save