aboutsummaryrefslogtreecommitdiff
path: root/node_simple.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_simple.js')
-rw-r--r--node_simple.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/node_simple.js b/node_simple.js
index 2c57d69..fcaa306 100644
--- a/node_simple.js
+++ b/node_simple.js
@@ -830,7 +830,7 @@ exports.remove_exam = function (fields, serverCallback) {
//get_exam_byID("578a44ff71ed097fc3079d6e");
-exports.get_exam_byID = function (id) {
+exports.get_exam_byID = function (id, serverCallback) {
// establish a connection
mongoFactory.getConnection(uri)
@@ -842,8 +842,8 @@ exports.get_exam_byID = function (id) {
exams.find( {_id: ObjectId(id)} ).toArray(function (err, docs) {
if (err) throw err;
else {
- // console.log(JSON.stringify(docs, null, 2));
- console.log(docs);
+ serverCallback(docs[0]);
+ //console.log(docs);
}
});
})