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
61a8bc7b
authored
May 16, 2017
by
Jose Antonio
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
WS active scene
parent
7cc915b7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
sails/src/api/controllers/StudentController.js
sails/src/assets/scripts/modules/student/controllers/collections.js
sails/src/api/controllers/StudentController.js
View file @
61a8bc7b
...
@@ -859,12 +859,13 @@ module.exports = {
...
@@ -859,12 +859,13 @@ module.exports = {
.
then
(
student
=>
{
.
then
(
student
=>
{
student
.
id_active_scene
=
params
.
id_scene
;
student
.
id_active_scene
=
params
.
id_scene
;
delete
student
.
password
;
delete
student
.
password
;
delete
student
.
username
;
student
.
save
(
function
(
error
){
student
.
save
(
function
(
error
){
if
(
error
){
if
(
error
){
return
res
.
serverError
(
"Error updating active scene"
);
return
res
.
serverError
(
"Error updating active scene"
);
}
}
else
{
else
{
return
res
.
ok
();
return
res
.
ok
(
student
);
}
}
})
})
}).
catch
(
function
(
err
){
}).
catch
(
function
(
err
){
...
...
sails/src/assets/scripts/modules/student/controllers/collections.js
View file @
61a8bc7b
...
@@ -297,13 +297,11 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
...
@@ -297,13 +297,11 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
$scope
.
activate_scene
=
function
(
scene
)
{
$scope
.
activate_scene
=
function
(
scene
)
{
$http
.
put
(
config
.
backend
+
'/stu/'
+
$scope
.
studentData
.
id
+
'/activeScene/'
+
scene
.
id
,
{
id_scene
:
scene
.
id
})
$http
.
put
(
config
.
backend
+
'/stu/'
+
$scope
.
studentData
.
id
+
'/activeScene/'
+
scene
.
id
,
{
id_scene
:
scene
.
id
})
.
success
(
function
()
{
.
success
(
function
(
stu
)
{
var
data
=
{
id
:
scene
.
id
};
io
.
socket
.
post
(
'/s
cene
'
,
{
io
.
socket
.
post
(
'/s
tu/config
'
,
{
action
:
'
activ
ate'
,
action
:
'
upd
ate'
,
scene
:
data
attributes
:
stu
},
function
()
{});
},
function
()
{});
$translate
(
'scene_updated'
).
then
(
function
(
translation
)
{
$translate
(
'scene_updated'
).
then
(
function
(
translation
)
{
...
...
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