aboutsummaryrefslogtreecommitdiff
path: root/node_simple.js
diff options
context:
space:
mode:
authorkumar <kumar.damani@mail.utoronto.ca>2016-07-24 00:56:03 +0000
committerkumar <kumar.damani@mail.utoronto.ca>2016-07-24 00:56:03 +0000
commitfe51deb31bbcc90530617b2b8aa60caf17c76729 (patch)
tree9027f2575490112dfb8bdf363e2bd02046cebd64 /node_simple.js
parentf94e655f733e3be2a5fa2b009e9899c1b8886f03 (diff)
parent18b6e474fb64f7e9b4699d3bfbf3f5276e6996ad (diff)
a pull
Merge branch 'master' of https://github.com/HumairAK/solutions_repo
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 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);
}
});
})