fixed error on admin/login

parent 9940ba2b
......@@ -17,4 +17,6 @@ Vagrant.configure(2) do |config|
config.vm.provision "shell", path: "install.sh"
config.vm.provision "shell", path: "pictoload.sh"
config.vm.provision "shell", path: "bootstrap.sh", run: "always"
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
end
......@@ -3,7 +3,7 @@
//------------------
// Login Controller
//------------------
dashboardControllers.controller('LoginAdminCtrl', function LoginAdminCtrl($scope, $http, $window, $translate, $location, config, ngToast) {
dashboardControllers.controller('LoginAdminCtrl', function LoginAdminCtrl($scope, $rootScope, $http, $window, $translate, $location, config, ngToast) {
// The last parameter, config, is injected from config.js (defined in dashboardConfig module)
$scope.credentials = {
......@@ -18,6 +18,7 @@ dashboardControllers.controller('LoginAdminCtrl', function LoginAdminCtrl($scope
// Save token, user data in sessionStorage
$window.sessionStorage.token = data.token;
$window.sessionStorage.user = JSON.stringify(data.user);
$rootScope.user = data.user;
// Redirect to admin panel
$location.path('/admin/licenses');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment