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
fe86a2d6
authored
Aug 06, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fixed minor error with promises declaration
parent
c051cdc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
sails/src/api/controllers/StudentController.js
sails/src/api/controllers/StudentController.js
View file @
fe86a2d6
...
@@ -208,7 +208,7 @@ module.exports = {
...
@@ -208,7 +208,7 @@ module.exports = {
//
//
// License number, if passed is used, otherwise, a trial one is generated
// License number, if passed is used, otherwise, a trial one is generated
//
//
Promise
(
function
(
resolve
,
reject
)
{
new
Promise
(
function
(
resolve
,
reject
)
{
if
(
params
.
license
)
if
(
params
.
license
)
resolve
(
params
.
license
);
resolve
(
params
.
license
);
else
{
else
{
...
@@ -467,7 +467,7 @@ module.exports = {
...
@@ -467,7 +467,7 @@ module.exports = {
// Get student ID either because we got it or through a license
// Get student ID either because we got it or through a license
// As it can be resolved through two possibilities, better to user promises!
// As it can be resolved through two possibilities, better to user promises!
//
//
Promise
(
funcion
(
reject
,
resolve
)
{
new
Promise
(
funcion
(
resolve
,
reject
)
{
if
(
!
params
.
id_stu
&&
params
.
license
)
{
if
(
!
params
.
id_stu
&&
params
.
license
)
{
// get student, license attribute will be completed
// get student, license attribute will be completed
License
.
getStudent
(
params
.
license
,
function
(
err
,
stu
)
{
License
.
getStudent
(
params
.
license
,
function
(
err
,
stu
)
{
...
...
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