correctly redirect after authentication

This commit is contained in:
Matteo Pagliazzi 2015-02-08 21:45:30 +01:00
parent 58cec5259a
commit 8b88b34475

View file

@ -15,7 +15,7 @@ angular.module('habitrpg')
var runAuth = function(id, token) {
User.authenticate(id, token, function(err) {
$window.location.href = '/';
$window.location.href = ('/' + window.location.hash);
});
};
@ -57,7 +57,7 @@ angular.module('habitrpg')
$scope.playButtonClick = function(){
window.ga && ga('send', 'event', 'button', 'click', 'Play');
if (User.authenticated()) {
window.location.href = '/#/tasks';
window.location.href = ('/' + window.location.hash);
} else {
$modal.open({
templateUrl: 'modals/login.html'