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
6853e6da
authored
May 11, 2017
by
Jose Antonio
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
GetScene fix active scene
parent
eabf6c9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
sails/src/api/controllers/SceneController.js
sails/src/api/controllers/SceneController.js
View file @
6853e6da
...
@@ -110,12 +110,17 @@ module.exports = {
...
@@ -110,12 +110,17 @@ module.exports = {
return
res
.
badRequest
();
return
res
.
badRequest
();
}
}
else
{
else
{
Scene
.
pictos
(
scene
.
id
,
function
(
err
,
pictos
){
Student
.
findOne
({
id
:
scene
.
student
}).
then
(
student
=>
{
Scene
.
pictos
(
scene
.
id
,
function
(
err
,
pictos
){
if
(
err
){
if
(
err
){
return
res
.
serverError
(
"Error obtaining pictos: "
+
err
);
return
res
.
serverError
(
"Error obtaining pictos: "
+
err
);
}
}
scene
.
pictos
=
pictos
;
scene
.
active
=
scene
.
id
==
student
.
id_active_scene
;
return
res
.
ok
(
scene
);
scene
.
pictos
=
pictos
;
return
res
.
ok
(
scene
);
});
}).
catch
(
function
(
err
){
});
});
}
}
}).
catch
(
function
(
err
){
}).
catch
(
function
(
err
){
...
...
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