diff options
| author | HumairAK <humair88@hotmail.com> | 2016-07-27 00:18:22 +0000 |
|---|---|---|
| committer | HumairAK <humair88@hotmail.com> | 2016-07-27 00:18:22 +0000 |
| commit | 38594fd274a4bebee75ae71dbed457b39d253cae (patch) | |
| tree | 52600020d82067ed66975f137c9ce7920a83aa90 /node_simple.js | |
| parent | b65166302f5296165da115ed96ce112433157a2d (diff) | |
fixed false exam path search for solutions, minor change to db function
Diffstat (limited to 'node_simple.js')
| -rw-r--r-- | node_simple.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/node_simple.js b/node_simple.js index 008cf81..50d8469 100644 --- a/node_simple.js +++ b/node_simple.js @@ -782,7 +782,7 @@ exports.get_all_solutions = function (exam_id, q_num, callback) { if (!success && failure) { // some error occurred while searching callback(false, true, "Error: Some error occurred while searching for exam", null); } else if (!success && !failure) { - callback(false, true, "Error: this exam doesn't exist", null); + callback(false, true, "Error: this exam does not exist", null); } else if (success && !failure) { // this exam exists proceed with task mongoFactory.getConnection(uri).then(function (db) { @@ -1230,7 +1230,7 @@ exports.get_exam_byID = function (id, callback) { exams.find( {_id: ObjectId(id)} ).toArray(function (err, docs) { if (err) { callback(false, true, null); - } else if (!docs) { + } else if (docs.length == 0) { callback(false, false, null); } else { |
