Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
944b0459
authored
Sep 26, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fixed error on admin/login
parent
9940ba2b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
1 deletions
sails/Vagrantfile
sails/src/api/controllers/AdminController.js
sails/src/assets/scripts/modules/admin/controllers/login.js
sails/Vagrantfile
View file @
944b0459
...
@@ -17,4 +17,6 @@ Vagrant.configure(2) do |config|
...
@@ -17,4 +17,6 @@ Vagrant.configure(2) do |config|
config
.
vm
.
provision
"shell"
,
path:
"install.sh"
config
.
vm
.
provision
"shell"
,
path:
"install.sh"
config
.
vm
.
provision
"shell"
,
path:
"pictoload.sh"
config
.
vm
.
provision
"shell"
,
path:
"pictoload.sh"
config
.
vm
.
provision
"shell"
,
path:
"bootstrap.sh"
,
run:
"always"
config
.
vm
.
provision
"shell"
,
path:
"bootstrap.sh"
,
run:
"always"
config
.
ssh
.
shell
=
"bash -c 'BASH_ENV=/etc/profile exec bash'"
end
end
sails/src/api/controllers/AdminController.js
View file @
944b0459
sails/src/assets/scripts/modules/admin/controllers/login.js
View file @
944b0459
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
//------------------
//------------------
// Login Controller
// 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)
// The last parameter, config, is injected from config.js (defined in dashboardConfig module)
$scope
.
credentials
=
{
$scope
.
credentials
=
{
...
@@ -18,6 +18,7 @@ dashboardControllers.controller('LoginAdminCtrl', function LoginAdminCtrl($scope
...
@@ -18,6 +18,7 @@ dashboardControllers.controller('LoginAdminCtrl', function LoginAdminCtrl($scope
// Save token, user data in sessionStorage
// Save token, user data in sessionStorage
$window
.
sessionStorage
.
token
=
data
.
token
;
$window
.
sessionStorage
.
token
=
data
.
token
;
$window
.
sessionStorage
.
user
=
JSON
.
stringify
(
data
.
user
);
$window
.
sessionStorage
.
user
=
JSON
.
stringify
(
data
.
user
);
$rootScope
.
user
=
data
.
user
;
// Redirect to admin panel
// Redirect to admin panel
$location
.
path
(
'/admin/licenses'
);
$location
.
path
(
'/admin/licenses'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment