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
11b85186
authored
Jan 11, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fixed error on bad data treatment in res.notFound method
parent
d8b5493a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
sails/src/api/controllers/StudentController.js
sails/src/api/responses/notFound.js
sails/src/assets/scripts/modules/student/controllers/setup.js
sails/src/api/controllers/StudentController.js
View file @
11b85186
...
@@ -270,7 +270,7 @@ module.exports = {
...
@@ -270,7 +270,7 @@ module.exports = {
})
})
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
res
.
notFound
();
res
.
notFound
(
err
);
});
});
},
},
...
...
sails/src/api/responses/notFound.js
View file @
11b85186
...
@@ -29,7 +29,7 @@ module.exports = function notFound (data, options) {
...
@@ -29,7 +29,7 @@ module.exports = function notFound (data, options) {
// Log error to console
// Log error to console
if
(
data
!==
undefined
)
{
if
(
data
!==
undefined
)
{
sails
.
log
.
verbose
(
'Sending 404 ("Not Found") response: \n'
,
data
);
sails
.
log
.
verbose
(
'Sending 404 ("Not Found") response: \n'
,
JSON
.
stringify
(
data
)
);
}
}
else
sails
.
log
.
verbose
(
'Sending 404 ("Not Found") response'
);
else
sails
.
log
.
verbose
(
'Sending 404 ("Not Found") response'
);
...
...
sails/src/assets/scripts/modules/student/controllers/setup.js
View file @
11b85186
...
@@ -144,9 +144,9 @@ dashboardControllers.controller('StudentSetupCtrl', function StudentSetupCtrl(
...
@@ -144,9 +144,9 @@ dashboardControllers.controller('StudentSetupCtrl', function StudentSetupCtrl(
})
})
.
error
(
function
(
err
)
{
.
error
(
function
(
err
)
{
console
.
log
(
err
);
console
.
log
(
err
);
if
(
err
.
message
&&
err
.
message
.
search
(
'nvalid license'
))
if
(
err
.
message
&&
err
.
message
.
search
(
'nvalid license'
)
>
0
)
ngToast
.
danger
({
content
:
$translate
.
instant
(
'license_invalid'
)
});
ngToast
.
danger
({
content
:
$translate
.
instant
(
'license_invalid'
)
});
else
if
(
err
.
message
&&
err
.
message
.
search
(
'in use'
))
else
if
(
err
.
message
&&
err
.
message
.
search
(
'in use'
)
>
0
)
ngToast
.
danger
({
content
:
$translate
.
instant
(
'license_already_activated'
)
});
ngToast
.
danger
({
content
:
$translate
.
instant
(
'license_already_activated'
)
});
else
else
ngToast
.
danger
({
content
:
$translate
.
instant
(
'student_not_updated'
)
});
ngToast
.
danger
({
content
:
$translate
.
instant
(
'student_not_updated'
)
});
...
...
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