diff options
| author | HumairAK <humair88@hotmail.com> | 2016-07-24 04:19:27 +0000 |
|---|---|---|
| committer | HumairAK <humair88@hotmail.com> | 2016-07-24 04:19:27 +0000 |
| commit | 513312a00975a3fa0848736829e00d46825e853f (patch) | |
| tree | 75430b00c44cc5f9cfd2f56c3ec0a7cd0a472065 /node_simple.js | |
| parent | 2a3f37903f693cd5af13dbf8dd7df3d0f4e19ee0 (diff) | |
minor fixes
Diffstat (limited to 'node_simple.js')
| -rw-r--r-- | node_simple.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/node_simple.js b/node_simple.js index d9835a8..74a28db 100644 --- a/node_simple.js +++ b/node_simple.js @@ -557,31 +557,31 @@ exports.add_solution = function (fields, callback) { comments: [], author: fields[3] }; - console.log("CHECK 1"); + // establish a connection mongoFactory.getConnection(uri) .then(function(db) { - console.log("CHECK 2"); + // find the solutions table var solutions = db.collection('solutions'); // insert data into table solutions.insert(Data, function(err) { if (err) callback(false , "Error: Failed to add the solution"); else { - console.log("CHECK 3"); + // console.log("solution added"); callback(true, "Success: added solution successfully!"); db.close(function (err) { // close the connection when done if (err) throw err; }); - console.log("CHECK 4"); + } }); }) .catch(function(err) { console.error(err); }); - console.log("CHECK 5"); + }; |
