diff options
| author | kumar <kumar.damani@mail.utoronto.ca> | 2016-07-24 00:56:03 +0000 |
|---|---|---|
| committer | kumar <kumar.damani@mail.utoronto.ca> | 2016-07-24 00:56:03 +0000 |
| commit | fe51deb31bbcc90530617b2b8aa60caf17c76729 (patch) | |
| tree | 9027f2575490112dfb8bdf363e2bd02046cebd64 /node_simple.js | |
| parent | f94e655f733e3be2a5fa2b009e9899c1b8886f03 (diff) | |
| parent | 18b6e474fb64f7e9b4699d3bfbf3f5276e6996ad (diff) | |
a pull
Merge branch 'master' of https://github.com/HumairAK/solutions_repo
Diffstat (limited to 'node_simple.js')
| -rw-r--r-- | node_simple.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/node_simple.js b/node_simple.js index 0976791..26cbbe4 100644 --- a/node_simple.js +++ b/node_simple.js @@ -893,7 +893,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) @@ -905,8 +905,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); } }); }) |
