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
258604d1
authored
Jul 26, 2016
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Issue #492 fixed
parent
d485d773
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
sails/src/api/controllers/SupervisorController.js
sails/src/api/controllers/SupervisorController.js
View file @
258604d1
...
@@ -136,7 +136,7 @@ module.exports = {
...
@@ -136,7 +136,7 @@ module.exports = {
supervisor
.
active
=
true
;
supervisor
.
active
=
true
;
delete
supervisor
.
password
;
delete
supervisor
.
password
;
supervisor
.
save
();
supervisor
.
save
();
return
res
.
view
(
'accountActivated'
,
{
sup
:
supervisor
,
login_url
:
req
.
protocol
+
'
://'
+
req
.
headers
.
host
+
'/app'
});
return
res
.
view
(
'accountActivated'
,
{
sup
:
supervisor
,
login_url
:
'https
://'
+
req
.
headers
.
host
+
'/app'
});
})
})
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
return
res
.
serverError
(
"Error when activating account "
+
err
);
return
res
.
serverError
(
"Error when activating account "
+
err
);
...
@@ -236,7 +236,7 @@ module.exports = {
...
@@ -236,7 +236,7 @@ module.exports = {
var
message
=
sails
.
__
({
var
message
=
sails
.
__
({
phrase
:
'signin_mail'
,
phrase
:
'signin_mail'
,
locale
:
params
.
lang
||
'es-es'
locale
:
params
.
lang
||
'es-es'
})
+
req
.
protocol
+
'
://'
+
req
.
headers
.
host
+
'/sup/activate/'
+
sailsTokenAuth
.
issueToken
(
supervisor
.
id
,
60
*
24
*
7
);
// expires in 1 week
})
+
'https
://'
+
req
.
headers
.
host
+
'/sup/activate/'
+
sailsTokenAuth
.
issueToken
(
supervisor
.
id
,
60
*
24
*
7
);
// expires in 1 week
sails
.
log
.
debug
(
"Sending activation email: \n"
+
message
);
sails
.
log
.
debug
(
"Sending activation email: \n"
+
message
);
mailService
.
mailer
()
mailService
.
mailer
()
...
...
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