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
4314b85a
authored
May 02, 2017
by
Jose Antonio
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Delete populate, not necessary
parent
bd65f5cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
sails/src/api/controllers/SceneController.js
sails/src/api/controllers/StudentController.js
sails/src/api/controllers/SceneController.js
View file @
4314b85a
...
...
@@ -60,7 +60,7 @@ module.exports = {
});
}
}).
catch
(
function
(
err
){
return
res
.
serverError
(
"Could not find active_scene
"
);
throw
new
Error
(
"Could not find active_scene, maybe there is not an active scene yet
"
);
});
}
Scene
.
findOne
({
id
:
params
.
id
}).
then
(
function
(
scene
)
{
...
...
@@ -130,8 +130,7 @@ module.exports = {
getScene
:
function
(
req
,
res
){
if
(
typeof
req
.
params
.
id
==
'undefined'
||
!
req
.
params
.
id
)
return
res
.
badRequest
(
"scene id not defined"
);
Scene
.
findOne
({
id
:
req
.
params
.
id
})
.
populate
(
'stuPictos'
).
then
(
function
(
scene
){
Scene
.
findOne
({
id
:
req
.
params
.
id
}).
then
(
function
(
scene
){
if
(
!
scene
){
return
res
.
badRequest
();
}
...
...
sails/src/api/controllers/StudentController.js
View file @
4314b85a
...
...
@@ -827,7 +827,6 @@ module.exports = {
if
(
typeof
req
.
params
.
id_stu
==
'undefined'
||
!
req
.
params
.
id_stu
)
return
res
.
badRequest
(
"id_stu not defined"
);
Scene
.
findOne
({
student
:
req
.
params
.
id_stu
,
active
:
true
})
.
populate
(
'stuPictos'
)
.
then
(
function
(
scene
){
if
(
!
scene
)
return
res
.
badRequest
(
"Scene not found"
);
...
...
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