mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 06:01:22 +00:00
GUAC-1126: Query home page directly when logging in. Do not rely on redirect from '/'.
This commit is contained in:
@@ -26,6 +26,7 @@ angular.module('login').controller('loginController', ['$scope', '$injector',
|
|||||||
// Required services
|
// Required services
|
||||||
var $location = $injector.get("$location");
|
var $location = $injector.get("$location");
|
||||||
var authenticationService = $injector.get("authenticationService");
|
var authenticationService = $injector.get("authenticationService");
|
||||||
|
var userPageService = $injector.get('userPageService');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether an error occurred during login.
|
* Whether an error occurred during login.
|
||||||
@@ -52,7 +53,10 @@ angular.module('login').controller('loginController', ['$scope', '$injector',
|
|||||||
|
|
||||||
// Redirect to main view upon success
|
// Redirect to main view upon success
|
||||||
.success(function success(data, status, headers, config) {
|
.success(function success(data, status, headers, config) {
|
||||||
$location.path('/');
|
userPageService.getHomePage()
|
||||||
|
.then(function homePageRetrieved(homePage) {
|
||||||
|
$location.url(homePage.url);
|
||||||
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
// Reset and focus password upon failure
|
// Reset and focus password upon failure
|
||||||
|
Reference in New Issue
Block a user