removed doubled function ; return object instead of array with one element
This commit is contained in:
@@ -52,7 +52,7 @@ module.exports = {
|
||||
});
|
||||
},
|
||||
|
||||
loadSkill: function (skillDbID) {
|
||||
getSkill: function (skillDbID) {
|
||||
return new Promise ((resolve, reject) => {
|
||||
db
|
||||
.collection ('skill_list')
|
||||
@@ -92,20 +92,5 @@ module.exports = {
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
getSkill: function (id) {
|
||||
return new Promise ((resolve, reject) => {
|
||||
db
|
||||
.collection ('skill_list')
|
||||
.find ({_id: ObjectID (id)})
|
||||
.toArray ((err, result) => {
|
||||
if (err) {
|
||||
reject (err);
|
||||
}else{
|
||||
resolve (result);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user